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 19:14:18 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: stop cygwin sed adding ^M Message-ID: <20020123191418.F11608@cygbert.vinschen.de> Mail-Followup-To: cygwin AT cygwin DOT com References: <20020123175442 DOT GJ6765 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020123175442.GJ6765@redhat.com> User-Agent: Mutt/1.3.22.1i 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. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/