Friday, February 16, 2007

Stderr .... output to grep

When you use some program like spamassassin, you will notice that the debug information :

spamassassin -D --lint

goes to stderr ... so you cant use grep as straight forward as you want. Here is how to pipe it to grep in bash:

spamassassin --lint -D 2>&1 | grep ....

or spamassassin --lint -D > output.txt 2>&1

to pipe it to a file first.

No comments:

Post a Comment