X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Sat, 11 Feb 2012 11:06:00 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: sed strips CRs
Message-ID: <20120211100600.GA9823@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <2BF01EB27B56CC478AD6E5A0A28931F203F560E4@A1DAL1SWPES19MB.ams.acs-inc.net> <20120210150708.GA22832@calimero.vinschen.de> <CA+sc5m=UkJRKK9WZCvcfsetSUc_CHkGC-gFZEher3Tg=fK=RkQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <CA+sc5m=UkJRKK9WZCvcfsetSUc_CHkGC-gFZEher3Tg=fK=RkQ@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Feb 10 14:44, Earnie Boyd wrote:
> On Fri, Feb 10, 2012 at 10:07 AM, Corinna Vinschen wrote:
> > On Feb 10 08:02, Nellis, Kenneth wrote:
> >> Cygwin 'sed' seems to be stripping CRs from its input.
> >> Linux sed doesn't do this. Example:
> >
> > Try the -b option.
> 
> By this I assume you to mean that the -b option opens the input file
> in binary mode.  But the mount table the OP showed was already in
> binary mode.  Does sed not take that into consideration, I.E. it
> specifies the mode as a text file unless -b is specified, is this
> correct?

Yes.  By default files are fopened using the "rt" mode on systems
supporting this mode.  This behaviour is hardcoded into upstream sed.


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

