Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

More scripting & crontabs

Status
Not open for further replies.

Igaduma

Technical User
Nov 23, 2001
322
0
0
BE
Hi all,

I've got a script which uses the Korn shell,
but when running it periodically from the crontab as a root-job it seems to pick up the sh instead of the ksh.
I ofcourse started the script with !/usr/bin/ksh but that seems to be not working.

When running the script from a sh shell it does use the ksh for executing the script.

It seems a bit odd that you can't use ksh for it.
It works allright as an atjob from root.

Any help....welcome!

Iga
 
The first line should be:

#!/usr/bin/ksh

It looks like a comment but it's not.
 
Hi,
solved it, the script extracted the date from the simple /usr/bin/date command, but since cron uses its own LC_TIME had to specifiy the format date outputs.

Ta!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top