procmail
[Top] [All Lists]

Re: Using booleans to trigger a nested procedure?

1997-01-19 21:51:49
"Tom Betz" <tbetz(_at_)panix(_dot_)com> writes:
I want to be able to set a $FEATURE boolean in my .procmailrc that 
will turn on and off features in included files.

In sloppy pseudocode:

IF $FEATURE = on THEN
{
:0 c
do this stuff
besides whatever is 
being done anyway
outside this nested recipe
}

:0 c
* FEATURE ?? on
{
   # stuff
}

Note that everything to the right of the ?? is a regexp still, so if
you want to test for FEATURE containing exactly "on" you should write:

:0 c
* FEATURE ?? ^^on^^
{
   # stuff
}


With the '^^'s anchoring the very beginning and end of the value of
FEATURE's value.

Philip Guenther

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