procmail
[Top] [All Lists]

Re: formail -I

2002-04-07 14:31:11
"Ruud H.G. van Tol" <rvtol(_at_)isolution(_dot_)nl> writes:
Philip skribis:
In his previous message, the recipe was given as:
:0 fh w
| formail -I "Subject: [procmail]"$SUBJT

Problem 1: SUBJT contains a space and is not quoted so the shell splits
it into multiple arguments.  You should move the variable expansion into
the double quotes.

Right, I assumed some magic concatenation, as what happens
when you write:

NL="
"
var="some text"$NL

(I assume that var holds a string of length 10, the last character being
newline. The quotes get lost. Am I right?)

Word splitting on whitespace contained in unquoted variables is only
performed inside actions, '?' conditions, and the evaluations of TRAP.
So, the whitespace in the NL in the assignment to 'var' above isn't
split on or elided but rather included in the var value.


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