X-Spam-Check-By: sourceware.org
Message-ID: <454A3BB4.3060808@adacore.com>
Date: Thu, 02 Nov 2006 19:40:52 +0100
From: Nicolas Roche <roche@adacore.com>
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: bash CR and backquotes trouble
References: <454A2CE4.7030805@adacore.com> <454A3DC0.9040305@cygwin.com> <454A33A8.9050508@adacore.com> <454A47CD.50009@cygwin.com>
In-Reply-To: <454A47CD.50009@cygwin.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
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

Larry Hall (Cygwin) a écrit :
> Nicolas Roche wrote:
>> 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...
>
>
> OK.  So 'tr' is a better choice then.
>

What I want to avoid.... will generates a lot of changes that can't be 
automated :-(

>
> Dan has addressed this in his response so I won't repeat it.

Will try Dan solution with the new version of bash. As I said in my 
previous mail, if you are interesting in the results I will send them.


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/

