This is the mail archive of the
cygwin
mailing list for the Cygwin project.
sed strips CRs
- From: "Nellis, Kenneth" <Kenneth dot Nellis at acs-inc dot com>
- To: <cygwin at cygwin dot com>
- Date: Fri, 10 Feb 2012 08:02:03 -0600
- Subject: sed strips CRs
Cygwin 'sed' seems to be stripping CRs from its input.
Linux sed doesn't do this. Example:
$ seq 5 | unix2dos | tee foo | od -c
0000000 1 \r \n 2 \r \n 3 \r \n 4 \r \n 5 \r \n
0000017
$ sed 's/2/XXX/' foo | od -c
0000000 1 \n X X X \n 3 \n 4 \n 5 \n
0000014
$ uname -r
1.7.10(0.259/5/3)
$ mount
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
D:/cyghome on /home type ntfs (binary)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto)
K: on /cygdrive/k type mvfs (binary,posix=0,user,noumount,auto)
U: on /cygdrive/u type ntfs (binary,posix=0,user,noumount,auto)
V: on /cygdrive/v type mvfs (binary,posix=0,user,noumount,auto)
W: on /cygdrive/w type ntfs (binary,posix=0,user,noumount,auto)
Y: on /cygdrive/y type ntfs (binary,posix=0,user,noumount,auto)
Z: on /cygdrive/z type ntfs (binary,posix=0,user,noumount,auto)
$
--Ken Nellis
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple