Re: sed strips CRs
Paolo Bonzini <[email protected]>
| Newsgroups | gmane.comp.gnu.utils.bugs,gmane.os.cygwin |
|---|---|
| Message-ID | <[email protected]> |
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