Hello mighty procmail masters,
1) What is a simple way to use $? to set a variable if it is not already
defined?
I've tried using recipes, and simple equates like
# Set $VAR if not already set
VAR=`if !($?VAR) echo "value"`
but, obviously, that will clear VAR if already set.
Also, what is the syntax for a condition?
#deliver to "bad" folder if $VAR undefined
:0:
* $VAR ?? .....
bad
2) Is there an cleaner way of doing OR?
# Do something if file.1 OR file.2 doesn't exist
:0i
* ? test -f file.1
* ? test -f file.2
{
}
:0E
| (task to do if either file is missing)
3) Just to clear up my old memories:
What is the difference between "w" and "W" flags? I try both in
recipes where filter program fail, and I don't see any difference
in the log file. I get 'Program failure' messages in both cases.
Also, in a filter I don't need to use the "w" flag if I'm not worried
about a program failure, correct?
Thanks for the help,
Bill Moseley
moseley(_at_)netcom(_dot_)com