delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/27/22:58:55

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Wlodek Szafran <wlodek DOT szafran AT hwcn DOT org>
Subject: Re: sed: 4.1.5 breaks libtool generation
Date: Tue, 28 Feb 2006 03:56:53 +0000 (UTC)
Lines: 39
Message-ID: <loom.20060228T042525-389@post.gmane.org>
References: <43FE1CEF DOT 9030905 AT users DOT sourceforge DOT net> <43FECB5A DOT 7060908 AT cwilson DOT fastmail DOT fm> <20060224094106 DOT GK4294 AT calimero DOT vinschen DOT de> <dtmpf1$o83$1 AT sea DOT gmane DOT org> <20060224114151 DOT GL4294 AT calimero DOT vinschen DOT de> <loom DOT 20060225T045242-102 AT post DOT gmane DOT org> <20060227102321 DOT GC30238 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

Corinna Vinschen writes:

> Actually, what you describe is clear enough, but since CRLF handling
> isn't done by the Linux version of sed either, you would have the same
> problem on Linux.

Sure, no argument here.  My goal wasn't to prove that Cygwin's sed is doing
something wrong, but rather to confirm that the strange behaviour of the new
version of sed, encountered by some, is due to improper form of line ends, thus
the fault is on the user's, not tool's, side.

> The question here is how did this file get created with CRLF in the
> first place?

It's actually easy -- one just needs to use a Windows editor that's unaware of
alternative forms of line ends and quietly saves the file with CRLFs.

> However, I have a bit of a problem here, either files are read with CRLF
> conversion, as up to 4.1.4.  In that case you can't use sed on binary
> files.  Or sed does not do CRLF conversion as on any other OS.  Then you
> get trouble with plain DOS files.  However, this latter problem can be
> solved by using a filter like dos2unix before feeding the input to sed,
> while the first problem can never be solved if sed always makes a CRLF
> conversion.

If it were my decision, I'd go for the non-converting version, as is now, even
though it means that some users will be required to break certain habits.  After
all, Cygwin emulates Linux, so it figures that the same behaviour of tools
should be expected.

I, for one, learned my lesson, dos2unix'ed all files that are to be processed by
any of the Cygwin's tools and decided to (when in Windows) only use those
editors that respect the appropriate form of line ends.

By the way, kudos to you all gals and guys who keep this respectable machinery
running and evolving.

Best regards.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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