In message
<Pine.BSI.4.05L.10408121627090.18049-100000(a)moe.2bsd.com>,
Steven M. Schultz <sms(a)2BSD.COM> writes
On Thu, 12 Aug 2004, Carl Lowenstein wrote:
iota: try 1109$ ./bad
: bad interpreter: No such file or directory
iota: try 1110$ cat bad
#!/bin/sh
date
iota: try 1111$ od -c bad
0000000 # ! / b i n / s h \r \n d a t e \n
0000020
iota: try 1112$
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Note that there is a '\r' character at the end of the #! line.
And that's the cause of the problem. The kernel is scanning for
'\n' and when it finds the (unix) end-of-line character it then
tries to exec the program "/bin/sh\r" and fails.
Was the original script created on a windoze box perhaps? Or was
a different method of getting a \r used? :)
Cheers,
Steven Schultz
Hi Steve,
Long time no chat.
The scripts were tar'd off a Mandrake linux system then untar'd on a
SuSE system. Something has got munged in the process I guess.
What I'll do is a make really clean and then tr the whole thing to add
\n instead of \r and start again.
Judging by the above, you want to remove the \r, not change them to
\n.
Greg
--
Note: I discard all HTML mail unseen.
Finger grog(a)lemis.com for PGP public key.
See complete headers for address and phone numbers.