Tom Allison wrote,
| I was having trouble with the basic process of capturing a return code
| and comparing it with constants. All I'm really doing now is looking to
| see if the return code is !=0 or =0. What I should probably attempt is
| to check for 0, 1, or >1 and so on.
I'm foggy and headachy, so I couldn't read the entire post well (not Tom's
fault), but that part stood out and I'm going to address it out of context.
To get the exit code of a command into a variable, I think this works,
dummy=`command -opts parameters`
EXITSTATUS=$? # don't call it EXITCODE; that's special
but I know that this works (note the negation on the condition):
:0 flags if any
* other conditions if any
* 1^1 ! ? command -opts parameters
{ }
EXITSTATUS = $=
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail