bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sed strips CRs


From: Paolo Bonzini
Subject: Re: sed strips CRs
Date: Mon, 13 Feb 2012 17:33:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0

On 02/13/2012 04:43 PM, Earnie Boyd wrote:
>
> 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.

myfile is not the script file. The script file is the one that you pass to -f.

Using "rt" was introduced in both cases for Cygwin, so regressions on other systems shouldn't be a problem.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]