directing output in crontab

Wade Preston Shearer lists at wadeshearer.com
Tue Jul 22 16:25:51 MDT 2008


>>> For /bin/sh, the typical syntax to send stderr to the same place as
>>> stdout is "2>&1".
>>
>> Wouldn't that take the standard error and redirect it back to the
>> display? I want to take the standard output and standard error and
>> send them both to a log file.
>
> Sure.  you use 2>&1 when doing that.  Cause when you're redirecting  
> to a
> file you're redirecting stdout.

Would it be done like this then?

2>&1 > logfile

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2425 bytes
Desc: not available
Url : http://plug.org/pipermail/plug/attachments/20080722/6e9b68f7/attachment.bin 


More information about the PLUG mailing list