procmail
[Top] [All Lists]

Getting the Score

1996-07-13 17:39:13
I'm trying to catalog some files, to decide which ones need human
intervention, and I thought I'd use procmail's scoring mechanism.
The docs say, in regard to $=, the "final score environment variable:"

"This variable is set every time just after procmail has parsed all
conditions on a recipe (even if the recipe is not being executed)."

I take that to mean that $= is set even if the recipe comes up negative.
My question is: how can I print out a negative score?

I've tried, for test purposes:

:0 B
* -1^1 ^.*$
{ SCORE=$= }
:0 fWhb
| cat - >/dev/null; echo "score is: $SCORE"
:0
|

Which gives me a line count as expected if I remove the minus sign.
As shown, the score is negative, and although $= may be set, the
assignment is not executed, so the score remains out of reach.
I've tried every bracketing variation I can think of, to no avail.
How can I get that score, whatever its value?

Thanks in advance,
jimo(_at_)eskimo(_dot_)com

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