Results 1 to 2 of 2
I need to suppress the error message when the command is not working. I have given like below,
command_name 2> /dev/null
But it is not working in Red Hat Linux ...
- 09-29-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 1
Suppressing Error Message is not working
I need to suppress the error message when the command is not working. I have given like below,
command_name 2> /dev/null
But it is not working in Red Hat Linux release 9. Guide me.
Thanks in advance
- 09-29-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
It depends upon whether the error message is coming from the application/command itself, or from the shell (such as "command not found"). Redirecting as you did will only redirect command output to stderr. It will not affect any error messages output to stdout or messages from the shell. What exactly are you trying to do, and why?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote