You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Matt Kettler <mk...@evi-inc.com> on 2005/03/31 20:56:26 UTC

Re: redirect output from lint

bruno.delladucata@sptroth.com wrote:

>
>
>Hello all
>
>Can someone tell me how i can redirect the output from the command:
>spamassassin --lint
>to a file or maybe grep / awk
>
>spamassassin --lint | grep something
>does not work!
>
>I want to autmate the checks of all rules
>
>bruno
>  
>
Ahh, system admin 201, intermediate pipes and redirection

lint's output goes to stderr, therefore you need to do this to redirect it.

spamassassin --lint 2> file.out

Note that the "2" means "redirect filehandle 2" and file handle #2 is
stderr.

You can also do piping if you redirect stderr back to to stdout (handle 1):

spamassassin --lint 2>&1 | grep "sometext" > somefile.out