Why are some programs writing on stderr instead of stdout their output?

Posted by Zagorax on Stack Overflow See other posts from Stack Overflow or by Zagorax
Published on 2012-07-04T09:10:05Z Indexed on 2012/07/04 9:15 UTC
Read the original article Hit count: 153

Filed under:
|
|

I've recently added to my .bashrc file an ssh-add command. I found that

ssh-add $HOME/.ssh/id_rsa_github > /dev/null

results on a message "identity added and something else" every time I open a shell.

While

ssh-add $HOME/.ssh/id_rsa_github > /dev/null 2>&1

did the trick and my shell is now 'clean'.

Reading on internet, I found that other command do it, (for example time). Could you please explain why it's done?

© Stack Overflow or respective owner

Related posts about io

Related posts about stdout