procmail
[Top] [All Lists]

Re: Using | in tests

1997-12-02 11:16:16
Adam Haeder has this recipe,

| #search the body
| :0B:
| * ! 'FLAGxx|FLAGyy'
| $HOME/bad.log

and finds that mail containing FLAGxx in the body matches the recipe and is
stored in $HOME/bad.log.

I've left Adam's subject line alone, but the real problem isn't with using |
in tests: it is with using ' in tests.

The test message must have contained "FLAGxx" but not "'FLAGxx".  Apparently
Adam is used to using egrep at the shell prompt or in shell scripts and he
strong-quoted the regexp as if to prevent the shell from interpreting the
pipe symbol as a pipe action.

Try this:

  :0B:
  * ! FLAGxx|FLAGyy
  $HOME/bad.log

<Prev in Thread] Current Thread [Next in Thread>