procmail
[Top] [All Lists]

Re: variables (for an exit code)

2002-10-15 01:56:24
Dallman asked me about my recommendation to Tom Allison,

| >  :0HB
| >  * 1^1 ! ? /usr/bin/foo
| >  { }
| >  exitstatus = $=
|
| Why scoring, David?

Because, as I said, I prefer writing a test as a condition rather than as an
action.

| And why 1^1 as opposed to 1^0?

Tom indicated that he needed to extract the exact exit status.  "1^0 ! ?
command" would score 1 on any failure.  Reread the procmailsc(5) man page.

| Also, what about the current bug with the H flag on top,
| where it then can't be turned off later in the .procmailrc?
|
| >  :0 hw
| >  * HB ??  ! ? /usr/bin/foo
| >  { }
| >  exitstatus = $=

| Might be my choice.

I thought about that but figured it looked too cluttered and that Tom's
version might not need it, or that for all we knew his command might not need
to read the entire message, in which case B could be specified on the flag
line, or neither (implying H without B).  Then the bug would not be involved.

| (I haven't double-checked the syntax against my instinct.)

You left the weight out, so $= is sure to be 0.


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

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