error to null in cron jobs

Jason Joines joines
Mon May 17 11:53:43 PDT 2004


   How do you send errors to /dev/null in cron jobs?

   When I run nslookup manually on an IP address that doesn't have a 
name associated with it I get this output:
# nslookup 172.16.1.1
Server:  dynegy.osucba.edu
Address:  172.16.0.254

*** dynegy.osucba.edu can't find 172.16.1.1: Non-existent host/domain

   If I don't want to see the error, I issue the command like this and 
as desired i don't see the error:
# nslookup 172.16.1.1 2>/dev/null
Server:  dynegy.osucba.edu
Address:  172.16.0.254

   When I do the same thing in a script via cron, I get the error in the 
ouput even with 2>/dev/null.


Thanks,

Jason Joines
=============



More information about the Linux-users mailing list