procmail
[Top] [All Lists]

braces around variable names

2000-09-28 13:07:38
Sean told Vyacheslav,

| See countless recent posts saying how you DO NOT put variables in braces - 
| procmail doesn't use them.

Actually, procmail tolerates them.  Usually they're just bulk, but as in
Bourne shell there are two situations where they're needed:

1. When the character immediately following the variable is itself legal in
the name of a variable name, so that ${foo}ds provides a way to say "the
contents of $foo plus 'ds'" if that's what you want, because $foods would
be read as the contents of a variable named "foods."

2. When you make ${var+text}, ${var:+text}, ${var-text}, or ${var:-text}
substitutions.

Otherwise the braces are just bulk and can be dropped.


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