[pups] Installing begemot
Steven M. Schultz
sms at 2BSD.COM
Fri Aug 13 09:29:51 AEST 2004
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
More information about the TUHS
mailing list