Re: Error when script uses CRLF line endings w/ if stmt

2010-02-05 Thread Evan Driscoll
[This is an combination of a couple of replies to the various emails since last evening.] Pierre Gaston wrote: cygwin's bash is patched and provides a special igncr shopt option. try shopt -s igncr And with the ability to pass options to Bash on invocation with -o, this provides a better solu

Re: Error when script uses CRLF line endings w/ if stmt

2010-02-04 Thread Evan Driscoll
that it only appeared to work; in fact what was happening is that the CR character was being passed to echo as part of the argument, and it didn't affect the output. In fact, if you put a space after the 'a' and 'b', echo receives two arguments beyond the command