The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 03-01-2006
ScatterBrain ScatterBrain is offline
Registered User
 

Join Date: Feb 2006
Posts: 61
...or how about...

nohup ./my_program >/dev/null 2>error.log &

that is, if you don't care about standard output... but just wanna see stderr messages.

if you intend to do this a lot... or permanently with this script, you may want to consider adding within the script something like this:

exec 1>/dev/null
exec 2>error.log (or exec 2>&1 if you want no output at all)
Reply With Quote