delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Michael Hoffman <b3i4old02 AT sneakemail DOT com> |
Subject: | Re: \r in variables and test |
Date: | Mon, 23 Apr 2007 01:08:24 +0100 |
Lines: | 25 |
Message-ID: | <f0gtef$ki7$1@sea.gmane.org> |
References: | <20070422170609 DOT GV7781 AT interface DOT famille DOT thibault DOT fr> <f0g6n4$511$1 AT sea DOT gmane DOT org> <20070422174834 DOT GY7781 AT interface DOT famille DOT thibault DOT fr> |
Mime-Version: | 1.0 |
User-Agent: | Thunderbird 1.5.0.8 (Windows/20061025) |
In-Reply-To: | <20070422174834.GY7781@interface.famille.thibault.fr> |
X-IsSubscribed: | yes |
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 |
[Samuel Thibault] >>> In a ./configure script, I call a test program (native python, actually) >>> that outputs "True\r\n" and I put this result in variable foo. The >>> problem is that [ "$foo" = True ] doesn't return true because foo >>> actually contains True\r, not True. [Michael Hoffman] >> * [ ${foo/%$'\r'/} = True ] [Samuel Thibault] > This looks saner, but shouldn't the test program always do this itself? Well it's not test (or even the test built-in in bash) that strips out \n, but bash when you originally represent the output of the command in a variable. I don't know whether it would be a good idea for it to strip \r as well. > Anyhow, the place that needs to be fixed is rather > /us/share/autoconf-archive/ac_python_devel.m4 I think what needs to be fixed is the expectation that you can mix non-Cygwin Python with Cygwin everything else and things will work seamlessly. ;) -- Michael -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |