On Thu, 8 Aug 2002, Hanspeter Roth wrote:
On Aug 08 at 10:17, David W. Tamkin spoke:
[...]
By temporarily unsetting SHELLMETAS, we tell procmail that there's no
character in a command string that it can't handle on its own, and it
shouldn't even scan the command string to look for any. By restoring the
value of $SHELLMETAS when we're done, procmail is then able to call a shell
farther along in the rcfile if it needs to.
Thank you for your explanation.
Then the cycles are wasted for procmail to scan for the characters and
possibly to fork an extra shell process that wasn't needed.
Thus as long as I quote properly is it an issue of performance?
Yes, but not only performance - The shell looking for the global
and user's startup files and run if needed; set the environment;
set agine the stdio files, check if you need prompt (!?!?) and so on
Even if you have a big and strong machine which works on few messages
it still "looks ... not right" (:-)
However, your server must be _busy_ to note the difference.
It some times happens to me that I pipe twice into sed:
| sed 'session1' | sed 'session2'
You can use "-e" flag:
sed -e 'session1' -e 'session2'
Or write the sed commands in file and call the file by "-f":
sed -f somesedcommands.sed
The "|" will force procmail to call the shell.
(My experience with sed is limited.)
Should I set SHELL to light version of shell (/bin/ash or /bin/sh)
rather than something like bash?
I think that the gap is not so big. In some operating systems
bash(1) and sh(1) are symbolic linked to the same one binary
file. Anyway, sh(1) is very generic, standard (vanilla).
The "c family" like tcsh or csh are built for interactive session
and not recommended for batch mode or integration with other programs.
Take a rest and read the article with the name "Why Not Csh?" (:-)
or "Csh Programming Considered Harmful". Tom Christiansen covers
the csh(1) problems against sh(1) benefits (include bash, kash).
http://www.perl.com/pub/a/language/versus/csh.html
Bye,
Udi
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail