procmail
[Top] [All Lists]

Re: passing a score value to a program (was Re: scored weighting, and aborting questions.)

1997-03-21 13:32:12
dummy(_at_)cyberpass(_dot_)net (Robert) writes:
I would like to pass the score value to a program, but it doesn't work for
me.  I'm getting "variable syntax".  Basically, I'm doing things like this:

:0
*500^0 ^TOfoo(_at_)bar\(_dot_)com
|formail -I "X-myhdr: foo(_at_)bar" | procmail_print $=

I think the prob is that the $= is after the "|".  If I do something like:

Actually, the problem is that procmail has to invoke the shell to handle
the pipe, and therefore doesn't do it's own variable expansion.


:0
*500^0 ^TOfoo(_at_)bar\(_dot_)com
|echo $=

It works fine.

Is the score stored in any other "normal" named variable besides $=?

No, but you can store it there:

:0
* 500^0 ^TO_foo(_at_)bar\(_dot_)com
{
    SCORE = $=
    :0
    |formail -I"X-myhdr: foo(_at_)bar" | procmail_print $SCORE
}

Philip Guenther

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