sed strips CRs

Peter Rosin peda@lysator.liu.se
Mon Feb 13 16:26:00 GMT 2012


Earnie Boyd skrev 2012-02-13 16:43:
> On Mon, Feb 13, 2012 at 10:22 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
>> On 02/13/2012 03:56 PM, Corinna Vinschen wrote:
>>>
>>>> As long as it's consistent with coreutils I'll certainly do the change.
>>>
>>> Thanks!  Would you mind to CC the cygwin list when the next upstream
>>> sed release is available?
>>
>>
>> Sure, it should be real soon now since a new release has been long overdue.
>>
>> By the way, I'm still opening the script file with "rt".  I cannot think of
>> any case when you would want to keep CRs there.
> 
> The case of
> 
> sed -e 's/something/nothing/g' myfile > myfile2
> 
> as it works in Cygwin today would mean that in the case of the OP's
> drive settings myfile2 would not contain the CR.  Treating CR as white
> space is the more proper thing to do, IMO.

Paolo was talking about the "script file", i.e. the sed program.
He has already agreed to change the handling of the input/output.

Cheers,
Peter

--
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