On Wed, 1 Jul 1998, Zoki wrote:
> On Tue, 30 Jun 1998, Slyglif Cain wrote:
>
> *** So why is it I have #!/bin/sh as the first line in any script and it
> still doesn't work? BTW, even with that line in the script, I still have
> to type sh [script] in order to run it.
>
Probably because you didn't set the execute bit:
chmod +x script
or its not in your path
export PATH=$PATH:<path to your script>
or you didn't supply the full path name:
./script
or
/some/directory/script
Also try reading the man page on "execve".
man execve
Pay particular attention to the following:
DESCRIPTION
execve() executes the program pointed to by filename.
filename must be either a binary executable, or a shell
script starting with a line of the form "#! interpreter
[arg]". In the latter case, the interpreter must be a
valid full executable pathname and the contents of file-
name is presented to it on standard input.
--
John Darrah (u05192) | Dept: N/C Programming
Giddens Industries | Ph: (425) 353-0405 #229
PO box 3190 | Ph: (206) 767-4212 #229
Everett WA 98203 | Fx: (206) 764-9639
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.