This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: sed strips CRs


From: Earnie Boyd
>On Sat, Feb 11, 2012 at 12:56 PM, Corinna Vinschen wrote:>
>> That's why I wrote "on systems supporting this mode". ÂSed input is
>> text input in the first place. ÂTherefore it's using textmode in the
>> first place. ÂThis is done so for a long time. ÂIf it's not what you
>> need, there's a workaround, the -b option.
>
> I was stressing the issue of the confusion.  That being, Cygwin is
> different than Linux as well as it is similar.  Many expect it to be
> exactly matching.

I agree that it's confusing. More confusion:
sed's man page does not mention the -b option, although sed --help does.
grep also strips CRs, but has option -U to suppress this behavior.
awk also strips CRs. I could not find an awk option to suppress this.
IMHO it would be preferable to replace this confusing state and align 
these tools with Cygwin's philosophy to work like GNU/Linux.

The standard response to issues dealing with CRLF files is to point the
user to dos2unix and text mode mounts. This should be adequate without
the hidden behavior of sed/grep/awk and probably others.

Respectfully submitted,
Ken Nellis

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]