I came across a code snippet like `$ypmatch $host hosts 2>/dev/null` used in one of the perl files I was browsing. Can anyone let me know the significance of redirecting it to /dev/null.
I will post the same when I find it out.
Wednesday, December 3, 2008
Redirect to /dev/null
Subscribe to:
Post Comments (Atom)
3 comments:
It redirects stderr to /dev/null, meaning you won't see anything output on the standard error. You'll still see normal output.
By redirecting output (and stderr) to /dev/null you suppress output to standard-out.
Useful in pipes, or if you don't want to clutter screen with logging info.
~h
Thanks Guyz
Post a Comment