This is the mail archive of the
mailing list for the Cygwin project.
Re: stop cygwin sed adding ^M
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
>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
>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
>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.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html