This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Environment variable problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]