On Mon, Jun 07, 2004 at 02:22:40PM +0200, Dallman Ross wrote:
From: fleet(_at_)teachout(_dot_)org
I'd like to be shown a "procmail" way to maintain my
counters. Shelling out to update the counter for every
recipe that gets activated does eat up resources.
I'm out of town (on vacation) and not able to see the list
mail right now, so I don't know how this was answered by
others, if already. But here are a couple of ways for you.
Note that I can't log on as I'm writing this in order to test
any of this.
[. . . .]
Another way is to do math all the way through with scoring:
:0
* $ $=^0
* 1^0 one condition
{ }
:0
* $ $=^0
* 1^0 another condition
{ }
I believe, but I can't check right now the correctness of that belief,
that the totals ($=) will only accrete for recipes that "succeed."
Okay, my quick tests while dialed in from near the Danish border
indicate that's not really the case. Still, if you're only using
conditions and not "absolute" conditions such as
* 1^0
(with no regex or comparison after the weighted score), this
is a useful method.
--
dman
If that is wrong, then you can of course still set subtotal manually:
:0
* ${SUBTOT:-0}^0
* 1^0 some condition
{ SUBTOT = $= }
Rinse, wash, repeat.
Dallman (from somewhere near the Danish border)
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail