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


On Mon, Feb 13, 2012 at 7:56 PM, Andrey Repin wrote:
> Greetings, Nellis, Kenneth!
>
>> 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.
>
> While your reasoning is sound, I prefer them to behave the way they are for my
> own goals.
> I can't possible alter between text and binary mounts, or use d2u on and off
> in an attempt to produce consistent and predictable end results.

Consistent behavior is what I see as the issue.  IMO, sed, grep and
awk should behave the same as on UNIX for consistent and predictable
behavior.  Treating CR as white space not only helps the Windows user
it also helps the Unix user when Windows files are transferred to it.
I know that for sed at least treating CR as white space works very
well.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

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


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