bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BASH should not choke on scripts with DOS newlines.


From: Paul Jarc
Subject: Re: BASH should not choke on scripts with DOS newlines.
Date: Tue, 12 Mar 2002 16:02:10 -0500
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/20.7 (i386-redhat-linux-gnu)

address@hidden wrote:
> Bash will currently fail to execute a script if (at least) the
> first line of the script is terminated with the DOS newline
> (\r\n) sequence, since the name of the shell command appears
> to be "bash\r", which doesn't normally exist.

And thus the kernel (which is what inspects the #! line) isn't finding
and running bash at all.  There's nothing bash can do about this if
it's never invoked.  You can create a symlink named "bash\r" to make
the kernel find bash by this name:
# ln -s bash $'/bin/bash\r'
You can also ask your OS distributor to install such a symlink by
default.


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]