delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/11/02/13:06:33

X-Spam-Check-By: sourceware.org
Message-ID: <454A33A8.9050508@adacore.com>
Date: Thu, 02 Nov 2006 19:06:32 +0100
From: Nicolas Roche <roche AT adacore DOT com>
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: bash CR and backquotes trouble
References: <454A2CE4 DOT 7030805 AT adacore DOT com> <454A3DC0 DOT 9040305 AT cygwin DOT com>
In-Reply-To: <454A3DC0.9040305@cygwin.com>
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

Larry Hall (Cygwin) a écrit :
> On 11/02/2006, Nicolas Roche wrote:
>> I am using bash version:
>> 3.1.17(9)
>>
>> I have tried to use shopt -s igncr but I have an issue with the 
>> following shell construct:
>>
>> t=`gcc --print-multi-lib` where gcc is a mingw gcc.
>>
>> As my gcc is a mingw program, it outputs CR/LFs. In previous versions 
>> bash used to ignore the CR, so t variable was not containing any CR.
>> Now this is no more the case and this is causing some troubles 
>
>
> Why isn't "t=`gcc --print-multi-lib | d2u`" not a solution here?

Well for two reasons:
- portability. the same homemade scripts are also used among a large 
flavors of unixes (AIX, IRIX, HP-UX, Tru64, ....). dos2unix is not 
installed on all of them...
- these constructs are appearing  in projects like GCC (I triggered the 
error while building a mingw GCC).

Is there any technical reason why igncr does not handle this case ? 
What's the exact semantic of this option by the way ?

Nicolas

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