Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I append the result of a command to a file and redirect stderr to null?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

You can use >> for appending and 2> /dev/null for redirecting stderr:

mycommand >> outputfile 2> /dev/null

Although I suspect something very similar has been asked already...

share|improve this answer
    
I knew how to do each individually, but not both together. I couldn't find another question that asked for both. –  Benjamin Aug 14 '12 at 19:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.