Capture -D --lint output - SpamAssassin

This is a discussion on Capture -D --lint output - SpamAssassin ; Folks, I'm trying to capture/grep specific given info from the subject output, like this: #spamassassin -D --lint | grep database I KNOW that doesn't work, but describes my issue at hand. I've spent an hour+ searching for others with this ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Capture -D --lint output

  1. Capture -D --lint output

    Folks, I'm trying to capture/grep specific given info from the subject
    output, like this:

    #spamassassin -D --lint | grep database

    I KNOW that doesn't work, but describes my issue at hand. I've spent an
    hour+ searching for others with this same question without success. I
    remember this being posted on this list apprx 2 years ago and I can't find
    it now.

    Piping and grepping is easy to grab on other commands, but this one escapes
    me.

    Appreciate any help.

    Jack

    (^_^)
    Happy trails,
    Jack L. Stone

    System Admin
    Sage-american


  2. Re: Capture -D --lint output

    On czw, 2008-09-11 at 07:53 -0500, Jack L. Stone wrote:
    > Folks, I'm trying to capture/grep specific given info from the subject
    > output, like this:
    >
    > #spamassassin -D --lint | grep database
    >
    > I KNOW that doesn't work, but describes my issue at hand. I've spent an
    > hour+ searching for others with this same question without success. I
    > remember this being posted on this list apprx 2 years ago and I can't find
    > it now.
    >
    > Piping and grepping is easy to grab on other commands, but this one escapes
    > me.


    I don't understand what's your problem. You can't redirect stderr to
    different stream or what?

    --
    \.\.\.\.\.\.\.\.\.\.\.\.\.\ A new film by Borg... Star Borg VI: The
    ..\.Kruk@epsilon.eu.org.\.\. Unassimilated Country
    \.http://epsilon.eu.org/\.\
    ..\.\.\.\.\.\.\.\.\.\.\.\.\.


  3. Re: Capture -D --lint output

    Mariusz Kruk a écrit :
    > On czw, 2008-09-11 at 07:53 -0500, Jack L. Stone wrote:
    >> Folks, I'm trying to capture/grep specific given info from the subject
    >> output, like this:
    >>
    >> #spamassassin -D --lint | grep database
    >>
    >> I KNOW that doesn't work, but describes my issue at hand. I've spent an
    >> hour+ searching for others with this same question without success. I
    >> remember this being posted on this list apprx 2 years ago and I can't find
    >> it now.
    >>
    >> Piping and grepping is easy to grab on other commands, but this one escapes
    >> me.

    >
    > I don't understand what's your problem. You can't redirect stderr to
    > different stream or what?
    >


    No need for that attitude, we were all newbies once...
    It wouldn't have taken any longer to give the actual solution:

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

    John.

    --
    -- Over 3000 webcams from ski resorts around the world - www.snoweye.com
    -- Translate your technical documents and web pages - www.tradoc.fr


  4. Re: Capture -D --lint output

    Jack L. Stone wrote:
    > Folks, I'm trying to capture/grep specific given info from the subject
    > output, like this:
    >
    > #spamassassin -D --lint | grep database
    >
    > I KNOW that doesn't work, but describes my issue at hand. I've spent an
    > hour+ searching for others with this same question without success. I
    > remember this being posted on this list apprx 2 years ago and I can't find
    > it now.
    >
    > Piping and grepping is easy to grab on other commands, but this one escapes
    > me.
    >


    You need to redirect stderr to stdout if you want to use a pipe.

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


    You can also dump it to a file:

    spamassassin -D --lint 2> somefile.txt


  5. Re: Capture -D --lint output


    On Thu, 2008-09-11 at 07:53 -0500, Jack L. Stone wrote:
    > Folks, I'm trying to capture/grep specific given info from the subject
    > output, like this:
    >
    > #spamassassin -D --lint | grep database
    >

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


  6. Re: Capture -D --lint output

    On czw, 2008-09-11 at 15:06 +0200, John Wil**** wrote:
    > No need for that attitude, we were all newbies once...


    Sorry, wasn't meant as an insult or anything like that. Was more like
    surprised because I really didn't understand the problem.

    > It wouldn't have taken any longer to give the actual solution:
    >
    > spamassassin -D --lint 2>&1 | grep database


    Unless, of course, you're using another shell.
    I'd send the original asker to man page of his shell anyway. To read
    about input/output redirection. It can be quite useful in many other
    cases.

    --
    Kruk@ -\ | Microsoft Office 2000: Wzrasta Twoje IQ
    }-> epsilon.eu.org |
    http:// -/ |
    |


  7. Re: Capture -D --lint output

    At 03:16 PM 9.11.2008 +0200, Mariusz Kruk wrote:
    >On czw, 2008-09-11 at 15:06 +0200, John Wil**** wrote:
    >> No need for that attitude, we were all newbies once...

    >
    >Sorry, wasn't meant as an insult or anything like that. Was more like
    >surprised because I really didn't understand the problem.
    >
    >> It wouldn't have taken any longer to give the actual solution:
    >>
    >> spamassassin -D --lint 2>&1 | grep database

    >
    >Unless, of course, you're using another shell.
    >I'd send the original asker to man page of his shell anyway. To read
    >about input/output redirection. It can be quite useful in many other
    >cases.
    >
    >--
    > Kruk@ -\ | Microsoft Office 2000: Wzrasta Twoje IQ


    Yes, it was the shell "csh" I use. Tried "sh" and the suggested redirects
    work fine.

    Thanks....
    Jack

    (^_^)
    Happy trails,
    Jack L. Stone

    System Admin
    Sage-american


  8. Re: Capture -D --lint output

    At 03:16 PM 9.11.2008 +0200, Mariusz Kruk wrote:
    >On czw, 2008-09-11 at 15:06 +0200, John Wil**** wrote:
    >> No need for that attitude, we were all newbies once...

    >
    >Sorry, wasn't meant as an insult or anything like that. Was more like
    >surprised because I really didn't understand the problem.
    >
    >> It wouldn't have taken any longer to give the actual solution:
    >>
    >> spamassassin -D --lint 2>&1 | grep database

    >
    >Unless, of course, you're using another shell.
    >I'd send the original asker to man page of his shell anyway. To read
    >about input/output redirection. It can be quite useful in many other
    >cases.
    >
    >--


    Sorry to be a bother on this again, it is the shell issue. Is anyone
    running the csh (or tcsh) shell and know what the syntax should be to make
    this work? It works in the borne shell (sh). I've read the man pages on the
    shells but no joy with various efforts:

    (this is sh) spamassassin -D --lint 2>&1 | grep database
    (what for csh?) spamassassin -D --lint ?commands?

    Thanks again,
    Jack

    (^_^)
    Happy trails,
    Jack L. Stone

    System Admin
    Sage-american


  9. Re: Capture -D --lint output

    On Fri, 12 Sep 2008 11:45:43 -0500
    "Jack L. Stone" wrote:

    > Sorry to be a bother on this again, it is the shell issue. Is anyone
    > running the csh (or tcsh) shell and know what the syntax should be to
    > make this work? It works in the borne shell (sh). I've read the man
    > pages on the shells but no joy with various efforts:
    >
    > (this is sh) spamassassin -D --lint 2>&1 | grep database
    > (what for csh?) spamassassin -D --lint ?commands?


    Try: spamassassin -D --lint |& grep database

    My tcsh man page only refers to stderr as "diagnostic output."

    > Thanks again,
    > Jack


    --
    Ben Winslow


  10. Re: Capture -D --lint output

    On Fri, 12 Sep 2008, Jack L. Stone wrote:

    > Sorry to be a bother on this again, it is the shell issue. Is anyone
    > running the csh (or tcsh) shell and know what the syntax should be to make
    > this work? It works in the borne shell (sh). I've read the man pages on the
    > shells but no joy with various efforts:
    >
    > (this is sh) spamassassin -D --lint 2>&1 | grep database
    > (what for csh?) spamassassin -D --lint ?commands?
    >
    > Thanks again,
    > Jack


    On our systems in the "man" page for csh under the section on
    Input/Output redirection it has a stanza that says:

    Diagnostic output can be directed through a pipe with the standard
    output. Simply use the form |& rather than | by itself.


    So that means that you should be able to do the following:

    spamassassin -D --lint |& grep database

    This works on SuSE, RedHat, HP-UX (the various flavors of Unix that
    I have easy access to , so it -should- work for you.

    --
    Dave Funk University of Iowa
    College of Engineering
    319/335-5751 FAX: 319/384-0549 1256 Seamans Center
    Sys_admin/Postmaster/cell_admin Iowa City, IA 52242-1527
    #include
    Better is not better, 'standard' is better. B{


+ Reply to Thread