|
Home > Archive > Unix administration > February 2005 > shell scripts and cron
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
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???
| |
|
| Forgot, this is AIX 5.2 if it matters.
| |
| Chris F.A. Johnson 2005-02-07, 2:47 am |
| On Mon, 07 Feb 2005 at 04:26 GMT, TB wrote:
> 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??
Please do not multipost. Your question has been answered in
comp.unix.shell.
If you feel your post should go in more than one newsgroup, please
crosspost, i.e., put a comma-separated list of groups in the
Nresgroups: line.
--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
========================================
===========================
My code (if any) in this post is copyright 2005, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
|
|
|
|
|