procmail
[Top] [All Lists]

Re: Comparing variables

1999-04-09 00:24:35
Bruce Guenter <bruce(_dot_)guenter(_at_)qcc(_dot_)sk(_dot_)ca> writes:
I have figured out how to extract the result of programs into variables
in a procmail rc, but now I want to compare two variables' contents in a
rule and deliver.  Is there any way to do this?

To test for equality of two variables, VAR1 and VAR2:

        :0
        * VAR1 ?? $ ^^$\VAR2^^
        { whatever }

(Match the all-magic-regular-expression-characters-disarmed equivalent
 of VAR2's value against the value of VAR1, anchoring against both the
 start and end of VAR1's value.)


Philip Guenther

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