Output error / message to /dev/null
I have a batch job that run many commands , sometimes it generate errors ( for different reasons ) , so that there are many messages pop to the console , and write to messages log , can advise if I want the batch job DO NOT output anything or just output to /dev/null ( because there are too many messages ) , what can i do ? thx
|
Usually redirecting both the standard output and the standard error to /dev/null is enough:
Code:
/path/to/script > /dev/null 2>&1 |
what does 2>&1 represent?
|
|
Quote:
Code:
2>&1 |
Note that if you are getting msgs (particularly on stderr) you should redirect to a logfile so you can fix the issues...
|
All times are GMT -5. The time now is 07:10 PM. |