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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AWK (gawk,nawk) scripts from CRONTAB

Status
Not open for further replies.

BU

Programmer
Apr 25, 2000
1
ES
I have some awk scripts that work correctly when I execute it. But doesn't work from crontab...somebody know why??<br>Thanks
 
The cron may be running it under a different shell.&nbsp;&nbsp;You could try forcing it to use a specific shell by putting in the first line &quot;#!/usr/bin/XXX&quot; where XXX is either ksh or csh or whatever shell you are using.&nbsp;&nbsp;Also, in the cron at the end of the line, redirect the output and see what it has to say if anything, i.e. &quot;&gt;/tmp/cron.out 2&gt;&1&quot;.&nbsp;&nbsp;Lastly, check /var/cron/log to see if there is anything there.&nbsp;&nbsp;Good Luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top