procmail
[Top] [All Lists]

Re: Filtering this list - sed usage

2004-08-01 13:46:07
Justin Gombos wrote:

I've been wondering how long the $MATCH variable persists after it's
set.  Is $MATCH cleared upon exiting a recipe?

No. It persists until you clobber it by literally assigning it, by unsetting it, or by routing the message through a matching regexp that includes the \/ extractor and sets a new value for MATCH ... or until procmail exits. (I've never tried using it in TRAP, though; I wonder whether it would persist into the trap.)

Note that it's a matching regexp, not a matching condition. An inverted condition with an extracting regexp that matches will still change $MATCH, even though, being inverted, the condition as a whole will not match.

$= is a different beast. It comes to life at the end of a recipe that has scores, and it dies at the beginning of the action line of the next recipe (except those that procmail routes around and doesn't even start to evaluate). It survives, however, through the conditions of the next recipe, even if they have scores of their own.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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