procmail
[Top] [All Lists]

Re: greping a variable

1999-10-31 22:27:33
"S.Toms" <tomas(_at_)primenet(_dot_)com> writes:
 If I extract something to MATCH, what would be the best way to grep
it? I have something like the following but am wondering if there is a
better way.

Use the "var ??" syntax:

        :0
        * ^Header:[     ]*\/[^  ].*
        * MATCH ?? something
        ...

...
{ /dev/null }

That probably doesn't do what you think it does.  If you want to
throw out a message, just deliver it to /dev/null:

        :0
        * conditions
        /dev/null

OR, set the HOST variable to anything but your machine's hostname, or
unset it:

        :0
        * conditions
        { HOST }


 Basically I want to grep a header for 5 or more instances of something
...

To search for 5 or more instances of something in a procmail regexp,
just put five copies in a row.  (If there are more than five present,
then a match on five of them will obviously succeed.)


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>
  • Re: greping a variable, Philip Guenther <=