On Sep 19, 2003, at 6:19 PM, Ken Douglass @pacbell.net wrote:
Hi Dallman,
In your "virussnag" file I see this expression:
MYVIRUS = "${MYVIRUS:-VIRUS}"
I believe that says "set MYVIRUS to $MYVIRUS if it's defined, otherwise
set it to the literal text 'VIRUS'," but I don't know WHY. I found a
small mention of the ${VAR:-text} format in man procmailrc
BUGS
The only substitutions of environment variables that can be
handled by
procmail itself are of the type $name, ${name},
${name:-text},
${name:+text}, ${name-text}, ${name+text}, $\name, $#, $n, $$,
$?, $_,
$- and $=; whereby $\name will be substituted by the
all-magic-regular-
expression-characters-disarmed equivalent of $name, $_ by the
name of
the current rcfile, $- by $LASTFOLDER and $= will contain the
score of
the last recipe.
but not enough to understand it
this link from google <http://www.postfix.org/uce.html> shows a syntax
of
{name:text} expands to text if $name is empty.
but that's postfix, not procmail.
searching for regex info was not that helpful either, even after
checking man regex and man regcomp. Man expr has this to say:
expr1 : expr2
The ``:'' operator matches expr1 against expr2, which must
be a
regular expression. The regular expression is anchored to
the
beginning of the string with an implicit ``^''. expr
expects
"basic" regular expressions, see re_format(7) for more
informa-
tion on regular expressions.
If the match succeeds and the pattern contains at least
one regu-
lar expression subexpression ``\(...\)'', the string
correspond-
ing to ``\1'' is returned; otherwise the matching operator
returns the number of characters matched. If the match
fails and
the pattern contains a regular expression subexpression
the null
string is returned; otherwise 0.
which is not helpful to me since there is no regular expression that I
can see.
--
Heisenberg's only uncertainty was what pub to vomit in next and Jung
fancied Freud's mother too. -- Jared Earle
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail