delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/04/22/14:06:41

X-Spam-Check-By: sourceware.org
Message-ID: <462BA41F.72C7789C@dessent.net>
Date: Sun, 22 Apr 2007 11:06:23 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: \r in variables and test
References: <20070422170609 DOT GV7781 AT interface DOT famille DOT thibault DOT fr>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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 wrote:

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

$foo=$(python command | d2u)

Brian

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