delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/12/19/11:07:15

From: csw AT epigram DOT com (Chris Warth)
Subject: bug in sed?
19 Dec 1996 11:07:15 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199612191737.JAA09990.cygnus.gnu-win32@epigram.epigram.com>
Original-To: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

sed under gnu-win32 seems to append a "\r\n" pair to all of its
output - even if the input did not have one.  Is this a bug?  Or is
this behavior required in order to work under win32?  The 'sed' in MKS
toolkit does the same thing, incidentally, but it does not happen on
real BSD systems.

-csw

bash$ echo -n "foo "
foo bash$ echo -n "foo " | cat
foo bash$ echo -n "foo " | sed 's/o/x/g'
fxx
bash$ echo -n foo | /mksnt/mksnt/sed 's/o/x/g' | od -c
0000000000     f   x   x  \r  \n
0000000005






-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019