1.7.5: Extra \r when redirecting output

Garber, Dave (GE Energy, Non-GE) dave.garber@ge.com
Thu Jul 8 13:44:00 GMT 2010


I'm seeing the following behavior in 1.7.5 and also 1.5.25, but not in
1.3.12 (yes, we still use that version).
 
On a text mode mount, we have the file foo which has \r\n line endings.
If I do
    grep -i line foo|od -cd
then the output shows proper \r\n line endings.
 
However, if I do
    grep -i line foo >foo.out
    od -cd foo.out
then the line endings are \r\r\n.
 
See attached files.
This works fine on binary mounts.  
 
Thanks,
Dave  
 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.out
Type: application/octet-stream
Size: 45 bytes
Desc: foo.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100708/28765800/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo
Type: application/octet-stream
Size: 45 bytes
Desc: foo
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100708/28765800/attachment-0001.obj>
-------------- next part --------------
--
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


More information about the Cygwin mailing list