Odd behavior of scripts in dos mode

Andrew DeFaria Andrew@DeFaria.com
Thu Apr 26 17:22:00 GMT 2012

On 4/26/2012 7:40 AM, Eric Blake wrote:
> On 04/26/2012 08:13 AM, Andrew DeFaria wrote:
>> I remember that Cygwin used to not be able to run scripts that were
>> converted or were in "DOS" mode - had trailing carriage returns in the
>> file. It would fail because the #! line might have /bin/bash\r which was
>> not a file (bash with a carriage return that is). But the behavior has
>> changed. Now it seems to ignore the trailing carriage return and it
>> execs bash itself. But it fails later on with other carriage returns.
> If you want bash to ignore carriage returns, then ask it to do so:
> http://sourceware.org/ml/cygwin-announce/2011-02/msg00027.html
Interesting and it kinda explains that this is relatively new behavior 
and why it seems to interpret the #! line correctly.
Andrew DeFaria <http://defaria.com>
What hair color do they put on the driver's licenses of bald men?

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