"David W. Tamkin" <dattier(_at_)Mcs(_dot_)Net> writes:
...
That it can be done in only one process is the only reason for using that
shortcut. If you're going to use multiple processes, this is closer to being
100% bullet-proof:
formail -s echo < $MAILFILE | wc -l
or
FILENO=1 formail -s printenv FILENO < $MAILFILE | tail -1
There's no need for the echo or printenv. To paraphrase from a message
you sent to the list in Dec 1996 (forget the Shadow; the _Net_ knows!):
formail -I'From x' -zx'From ' -s < mailbox | wc -l
Two processes, two bytes down the pipe per message, and it gets
Content-Length headers right.
Philip Guenther