"Bad interpreter" shell messages

Paul F. Almquist paul at almquist.name
Sun Jan 30 08:07:02 UTC 2005


On Saturday 29 January 2005 22:28, Matthew Miller wrote:
> On Sat, Jan 29, 2005 at 10:55:06PM -0500, Robert L Cochran wrote:
> > >interpreter used for it.. Look at the first line of configit.sh - it
> > >should start with #!/bin/sh
>
> [...]
>
> > Yes it does start with #! /bin/sh. The output you requested:
>
> Ahh. Does it start with "#!/bin/sh", or "#! /bin/sh" with a space, as you
> wrote? Should be no space.
The space is acceptable, even several spaces works.  It must be something 
else.

If the script was written on a windows box there may be a <cr><lf> sequence at 
the end of each line, depending on how it was copied onto the linux box.  the 
<lf> is the same as the unix <nl> which is the normal end of line marker but 
the <cr> will make the file name in the specified path to be /bin/sh<cr> 
because <cr> is a valid character in a file name, although not a recommended 
one.  of course that is not the desired file name.

run the script thru the dos2unix(1) command to get rid of the <cr> at the end 
of the lines.  If it is not that then perhaps some other non-printing 
character is on that line.

paul

-- 
Paul F. Almquist
paul at almquist.name
Eau Claire, WI  USA




More information about the users mailing list