procmail
[Top] [All Lists]

Re: Re-filtering....

2001-01-09 12:44:02
"David W. Tamkin" <dattier(_at_)ripco(_dot_)com> writes:
Philip wrote,

| Of course, if there are shell metacharacters or whitespace in the
| filename, that'll do Bad Things.  If your shell supports arguments to
| commands run via the -c flag, then the following would be safer:
| 
| find $d -maxdepth 1 -type f -exec sh -c 'procmail < "$0"' {} \;

But wouldn't that shell, even if it can take more than one argument after
-c, substitute "procmail" for "$0" rather than the filename that find puts
in for {}?  Shouldn't it be $1 rather than $0, then?

Nope.  I thought so too but a reading of the manpage followed by
experiments changed my mind.


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>