On Sat, Dec 12, 2009 at 15:49, Gary Johnson <garyj...@spocom.com> wrote: > On 2009-12-11, rgc3679 wrote: >> Any ideas? > > Thanks for all the details. That really helps. It looks to me as > though your script file has CR-LF (DOS) line endings rather than LF > (Unix) line endings. The current version of Cygwin's bash sees only > the LF line endings and includes the CR as part of the script. You > can use the d2u utility to fix this.
Also, if this is the cause, you can use the Cygwin-specific igncr option in bash to ignore CR characters: $ bash -O igncr ... Note that this has to be set at the time an instance of bash is started (-O igncr), and AFAIK cannot be set afterward (e.g. via shopt). I've set this in Cygwin.bat and used it successfully to allow users to run bash scripts that are in DOS text-file format. This turns out to be really important when using git with core.autocrlf=true... -- David. -- 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