Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 23 Jan 2002 13:26:31 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: stop cygwin sed adding ^M Message-ID: <20020123182631.GA16029@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20020123175442 DOT GJ6765 AT redhat DOT com> <20020123191418 DOT F11608 AT cygbert DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020123191418.F11608@cygbert.vinschen.de> User-Agent: Mutt/1.3.23.1i On Wed, Jan 23, 2002 at 07:14:18PM +0100, Corinna Vinschen wrote: >On Wed, Jan 23, 2002 at 12:54:42PM -0500, Chris Faylor wrote: >> On Wed, Jan 23, 2002 at 03:58:57PM +0100, Schaible, Jorg wrote: >> >May be you should read the FAQ regarding text mounts ?? >> >> sed is a fully ported utility. It is supposed to read CRLF text on >> standard input and produce only UNIX-style newline endings on standard >> output. > >There's one situation I know that it actually converts LF to CRLF. > >Say, you have a file foo: > >$ od -c foo >0000000 h a l l o \n >0000006 > >and your currently in a textmode mounted directory, then > >$ sed -e 's/ll/nn/' foo > bar > >creates actually a CRLF file bar: > >$ od -c bar >0000000 h a n n o \r \n >0000007 > >and that's defined behaviour. That isn't even going on in sed. >The stdio redirection has already happened in the shell and sed >is just using that file descriptor. I stand corrected. Sorry for the misinformation. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/