X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0	tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4BFA6DBD.2040009@bopp.net>
Date: Mon, 24 May 2010 07:14:53 -0500
From: Jeremy Bopp <jeremy@bopp.net>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Environment variable problem
References: <28649448.post@talk.nabble.com> <4BF93791.6040302@cornell.edu> <28654002.post@talk.nabble.com> <1753866029.20100524140014@mtu-net.ru>
In-Reply-To: <1753866029.20100524140014@mtu-net.ru>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

On 05/24/2010 05:00 AM, Andrey Repin wrote:
> Greetings, Willie Vu!
> 
> 
>> You are right! d2u fixes the problem.  Thanks! :clap:
> 
> From my understanding of it, this shouldn't be a problem, as all whitespace
> characters should be stripped from value, unless explicitly quoted.

By default, bash only sees newline characters as the EOL markers.  The
carriage return character of the Windows line ending is treated the same
as any other character on the command line, so it becomes part of the
command.  In this case, it is appended to the value of the environment
variable.

Setting the SHELLOPT environment variable *in Windows* to igncr will
make bash behave as you expect.  Having the script on a text mount will
also work.  The generally considered best way is to ensure that the
script simply has Unix line endings.

-Jeremy

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

