Re: sed strips CRs

Earnie Boyd <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <CA+sc5m=1saftkMfJhJcoKp8ynGsYQ7ZJW+hq1jgSJQmQKobPmg__30989.4428159625$1329149691$gmane$org@mail.gmail.com>
On Mon, Feb 13, 2012 at 10:22 AM, Paolo Bonzini <[email protected]> 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.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.