[Top][All Lists]

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

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

From: Charles Sullivan
Subject: Re: BASH should not choke on scripts with DOS newlines.
Date: Tue, 12 Mar 2002 20:19:10 -0500

On Tue, 12 Mar 2002 16:02:10 -0500
address@hidden (Paul Jarc) wrote:

> 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.

Ahah!  I didn't understand it's the kernel and not bash which is responsible 
for this.  Many thanks for the clarification and for your suggestion 
about a symlink.

Charles Sullivan

reply via email to

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