procmail
[Top] [All Lists]

Re: Command Line Args

2002-05-27 23:10:21
James Raney <mlists(_at_)mad-seumas(_dot_)net> writes:
From the various sources I've been reading that:

:0
RECIPIENT=|echo "$@"

should take all of the command-line args (in this case a recipient list)
and store them in the variable $RECIPIENT (space-seperated).  Is this
correct?  It doesn't seem to be working correctly in the script I've
written.

Your information is incorrect: $@ does not contain all of procmail's
command-line arguments, but rather a particular subset of them.  To quote
the procmailrc(5) manpage (version 3.13.1):
                                                 ...  When the -a
       or -m options are used, "$@" will expand  to  respectively
       the  specified argument (list); but only when passed as in
       the argument list to a program.

(The grammer error in the sentence (incorrect use of semicolon) has
been fixed in newer versions.)

So the next question is: how are you invoking procmail?  That is, what
is the command line used to invoke it?


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