Gentoo Archives: gentoo-user

From: David Relson <relson@×××××××××××××.com>
To: gentoo-user@l.g.o
Cc: shrdlu@×××××××××××××.org
Subject: Re: [gentoo-user] script problem
Date: Sat, 02 Dec 2006 00:10:16
Message-Id: 20061201190553.6821ff08@osage.osagesoftware.com
In Reply to: Re: [gentoo-user] script problem by Etaoin Shrdlu
1 On Fri, 1 Dec 2006 18:59:29 +0100
2 Etaoin Shrdlu wrote:
3
4 > On Friday 1 December 2006 17:11, Etaoin Shrdlu wrote:
5 >
6 > > > bash: ./config: /bin/bash: bad interpreter: Permission denied (i'm
7 > > > root)
8 > >
9 > > This happened to me once. I finally found that the script source
10 > > file had been created with windows notepad (don't ask!), so it had
11 > > windows cr+lf line breaks, instead of unix style ones.
12 >
13 > Just out of curiosity, I did another check and it turns out that, in
14 > the situation I described, the error message is different (bad
15 > interpreter: No such file or directory). I had forgot the exact
16 > error, since it was much time ago.
17 > Instead, the other suggestions about noexec are right.
18
19 Should one happen to have a script with CR/LF pairs (as might happen if
20 the script came from a DOS/Windoze machine), bash will try to find
21 "/bin/bash\r" which doesn't exist. This gives a "bad interpreter"
22 message ...
23
24
25 --
26 gentoo-user@g.o mailing list