procmail
[Top] [All Lists]

Re: Reto's multiplication

2004-01-26 20:22:00
Reto had,

  MULTIPLIER="10"

  :0
  * $ 1^1 B ?? [$wsp]
  {
    TMP="$="
    SPACES=`echo $(( $TMP*$MULTIPLIER ));`
    TMP
  }

Won't this accomplish the same thing without the shell call and the extra variable?

MULTIPLIER=10

:0
* $ $MULTIPLIER^1 B ?? [$wsp]
{ SPACES = $= }

or for that matter, we can compress the entire code sample into one recipe:

MULTIPLIER=10

:0
* $ -$MULTIPLIER^1 B ?? [$wsp]
* $ 1^1 B ?? [$alpha]
{
 #do_something
}


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail