crontab & stderr discovery

ajs at hpfcla.UUCP ajs at hpfcla.UUCP
Fri Oct 4 10:55:00 AEST 1985


> This seems to indicate that a line such as:
> 
> 1 0 * * * /bin/sh /usr/adm/script.sh 1>/usr/adm/script.log 2>&1
> 
> wastes a shell; that it could be run as:
> 
> 1 0 * * * /usr/adm/script.sh 1>/usr/adm/script.log 2>&1

Not only that, you can save another shell by running it as:

  1 0 * * * exec /usr/adm/script.sh 1>/usr/adm/script.log 2>&1

I'll be amused if there are systems on which this fails!

Alan Silverstein, Hewlett-Packard Fort Collins Systems Division, Colorado
{ihnp4 | hplabs}!hpfcla!ajs, 303-226-3800 x3053, N 40 31'31" W 105 00'43"



More information about the Comp.unix mailing list