procmail
[Top] [All Lists]

Re: exactly once

2004-08-24 15:30:17
Dallman Ross wrote:

I've been
a bit ill, so I should be extra careful about proposing
something I haven't tested.  Bronchitis / bacterial infections /
broad-spectrum antibiotics / etc.

Hope you're better soon.

Meanwhile, regarding your earlier caution about troubles some builds or platforms have with fractional values of x, I tried my original code

 :0
 * 1^.-5 ! ? command
 * -.8^0
 action

on the other of the two platforms where I can run procmail, and it worked there as well. The test was like this:

# .onerc
preset=$1

:0
* 1^.-5 ! ? exit $preset ;
* -.8^0
{ LOG="$preset passed
" }
:0E
{ LOG="$preset failed
" }

HOST
# end .onerc

(at a pdksh prompt)

preset=-1

while (( (preset=preset+1) < 256 ))
do procmail -m .onerc $preset < /dev/null
done

= = =

It reported "failed" for 0, "passed" for 1, and "failed" for 2 through 255.


____________________________________________________________
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>