[Ilugc] Output redirection help needed
ashwin.chn at gmail.com
Sat Aug 27 08:38:36 IST 2011
On 19 August 2011 18:57, Prasanna Venkadesh <prasmailme at gmail.com> wrote:
> On Fri, Aug 19, 2011 at 5:23 PM, Sathia S <sathia2704 at gmail.com> wrote:
>> > espeak 'hi' > /dev/null 2>&1
> Thanks all for helping me out. The above thing works perfect. and can anyone
> give me explanation of what it does? One is it redirects to /dev/null and
> what does 2>&1 really does?
2 is error stream and defines where error are to be displayed . It is
by deafult set to your monitor. here you are re-directing standard
error stream to standard error to that of where standard output goes
which is going to /dev/null. I hope you know what is /dev/null. Read
up on file descriptors and i/o redirection in unix to know more.
More information about the ilugc