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

2010-02-04 Thread Pierre Gaston
On Fri, Feb 5, 2010 at 7:54 AM, Evan Driscoll wrote: > Jan Schampera wrote: >> >> drisc...@cs.wisc.edu schrieb: >> >>>        Some of the time, using CRLF line endings cause syntax errors >>>        in Bash scripts ("unexpected end of file"). >>> >>>        This problem shows up on Bash 4.1 on Lin

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

2010-02-04 Thread Jan Schampera
Evan Driscoll schrieb: > echo a > echo b > seemed to work with both CRLF and LF endings. However, further > experimentation confirmed what you probably already know, which is that > it only appeared to work; in fact what was happening is that the CR > character was being passed to echo as part

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

2010-02-04 Thread Evan Driscoll
Jan Schampera wrote: drisc...@cs.wisc.edu schrieb: Some of the time, using CRLF line endings cause syntax errors in Bash scripts ("unexpected end of file"). This problem shows up on Bash 4.1 on Linux, Bash 3.2 on Linux, and Bash 3.2 on Cygwin (where I first noti

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

2010-02-04 Thread Jan Schampera
drisc...@cs.wisc.edu schrieb: > Some of the time, using CRLF line endings cause syntax errors > in Bash scripts ("unexpected end of file"). > > This problem shows up on Bash 4.1 on Linux, Bash 3.2 on Linux, > and Bash 3.2 on Cygwin (where I first noticed it). Normal. Thou

Error when script uses CRLF line endings w/ if stmt

2010-02-04 Thread driscoll
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' -DPACKA