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

awk and crontab

Status
Not open for further replies.

jdfab5

MIS
Mar 7, 2002
3
US
I have an awk program with executable permissions. In this program exists another awk command line like this.

system("awk -f program2 file")

When I run the executable this second program2 runs just fine. However, when I enter the executable into crontab to schedule this program to run only the executable runs, not program2. Is there something with crontab that does not allow the awk executable to give a second awk command?
 
jdfab5:

You probably have a PATH issue. More than likely cron can't find program2 or the command-line agrument.

You're better off giveing the whole path to your objects - something like this:

system("awk -f /usr/whereever/bin/program2 /tmp/file")

Hope this solves your problem.

Regards,


Ed
Schaefer

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top