procmail
[Top] [All Lists]

Re: Purpose of $# is what?

2001-04-19 15:47:19
Looking through the surce code doesn't clear my confusion. Neither Jari
Aalto nor Alan K. Stebbens collections of receipes use this construct. So
just what is it suposed to do?

When you start procmail with the '-a' or '-m' options then $# is set to
the number of arguments on the command line.  When you're using '-a' you
can only give one argument so it will always have the value 1.  It's
more useful when you're using '-m'.

With this in your rcfile:

  VERBOSE=1
  VARHASH=$#

and doing:

  procmail -m .procmailrc arg1 arg2 arg3 arg4 <mail.file

you'll see this in the log file:

  procmail: Assigning "VARHASH=4"

It's in the man page somewhere, I'm sure.

Martin
-- 
Martin McCarthy                   /</       PGP key available
Home:         marty(_at_)nostrum(_dot_)com   \>\
http://www.ehabitat.demon.co.uk/  /</
_______________________________________________
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>