This is a discussion on Re: script execution problem within the Linux General forums, part of the Linux Forums category; On Thu, 31 Jul 2003 19:59:26 +0200, "Elekaj34" <elekaj34@hotmail.com> wrote: >Hello &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Thu, 31 Jul 2003 19:59:26 +0200, "Elekaj34" <elekaj34@hotmail.com> wrote:
>Hello > > I have installed a RedHat Linux 8.0 (on me home PC). > > In my /root directory, there is a file named 'jobs'. > This file has the following attributes : > -rwxr-xr-x 1 root root 1294 jui 31 19:47 jobs > > Tis file start with the following line : > #! /bin/sh Is that a space, between the #! and the /bin/sh ? If so, remove it. The shebang line /should/ read #!/bin/sh with no spaces between the #! and the path to the interpreter > When I try to run it, this is the result : > : bad interpreter: No such file or directory Yes. > In the /bin directory, the file 'sh' exist. If your shebang line is as you've transcribed it here, then it doesn't matter whether or not there is a /bin/sh. The kernel isn't looking for file /bin/sh, it's looking for " /bin/sh", which is a completely different file. > Can you help me ? Probably. > I want to be able to run this file correctly Try the script without the space in the shebang line, or reply with a better transcription of the shebang line. Good luck -- Lew Pitcher IT Consultant, Enterprise Technology Solutions Toronto Dominion Bank Financial Group (Opinions expressed are my own, not my employers') |
|
|||
|
Lew Pitcher <Lew.Pitcher@td.com> wrote:
> On Thu, 31 Jul 2003 19:59:26 +0200, "Elekaj34" <elekaj34@hotmail.com> wrote: >> In my /root directory, there is a file named 'jobs'. >> This file has the following attributes : >> -rwxr-xr-x 1 root root 1294 jui 31 19:47 jobs >> >> Tis file start with the following line : >> #! /bin/sh > Is that a space, between the #! and the /bin/sh ? > If so, remove it. The shebang line /should/ read Space is fine and even normal, Lew! > #!/bin/sh > with no spaces between the #! and the path to the interpreter Nope. Try it! >> When I try to run it, this is the result : >> : bad interpreter: No such file or directory He probably has an extra ctl-M (\r) at the end of his line. Yadda yadda. Written in msdos. Yadda. Peter |