delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/02/15/04:16:48

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 15 Feb 2012 10:16:01 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Cc: bug-sed AT gnu DOT org
Subject: Re: sed strips CRs
Message-ID: <20120215091601.GL25918@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com, bug-sed AT gnu DOT org
References: <CA+sc5m=C2=49c6grcLbwYz6rQNWux43m_oY9hvQGaGrh_guk_Q AT mail DOT gmail DOT com> <2BF01EB27B56CC478AD6E5A0A28931F203F5655A AT A1DAL1SWPES19MB DOT ams DOT acs-inc DOT net> <905541703 DOT 20120214045615 AT mtu-net DOT ru> <CA+sc5m=Y_eCqV_VzVj_WecAAOM7UPTWTX-BjoyQSMB+zb0VVFA AT mail DOT gmail DOT com> <1319883781 DOT 20120215011302 AT mtu-net DOT ru>
MIME-Version: 1.0
In-Reply-To: <1319883781.20120215011302@mtu-net.ru>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019