shell scripts and cron I need a shell question answered if someone could.
What happens if you don't put the traditional #!/bin/sh (or #!/bin/ksh)
in the first line of a script??
Here is my problem. I have some very simple scripts that don't have
this in the first line. A user's crontab is what normaly runs these
scripts and they run fine. I needed to run one manually so I ran it as
the full path. i.e. '/path/to/script/scriptname'. When I did, the
cursor dropped to the next line and nothing else happened. I did a ps
(from another session) and looked for the script in the process table.
It was not there. But when I entered '/bin/sh
/path/to/script/scriptname' the same thing happened with the prompt,
but there was a process running in the ps table.
These scripts have previously been ran manually but from the directory
where they reside and it worked. How can they run from the directory,
but not from the users home directory??? |