[Top][All Lists]

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

Re: sed strips CRs

From: Corinna Vinschen
Subject: Re: sed strips CRs
Date: Wed, 15 Feb 2012 10:16:01 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Feb 15 01:13, Andrey Repin wrote:
> Greetings, Earnie Boyd!
> >>> 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.
> Most apparent: it breaking EOL matches.

This is about the script, not the input file.  From my POV both works
fine here, either just ignoring the CR, or using "rt" mode.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

reply via email to

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