Environment variable problem

Jeremy Bopp jeremy@bopp.net
Mon May 24 17:45:00 GMT 2010


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



More information about the Cygwin mailing list