When I suggested to Aaron Dougherty,
| >Third, add an extra blank line at the foot of $HOME/www/faq.html; then you
| >can read the two files with one cat command and not have to break them apart
| >to echo a blank line in between.
| > :0h
| > * ^TOfaq
| > * !^X-Loop: swsim(_at_)swsim\(_dot_)com
| > | (formail -rA"X-Loop: swsim(_at_)swsim(_dot_)com" ; \
| > cat $HOME/www/faq.html $HOME/.signature) | $SENDMAIL -oi -t
Philip Guenther responded,
| If guaranteeing a blank line at the end of faq.html is not possible
| (say, it's generated by someone else who's rather forgetful), you can
| still do it in one call to 'cat' by piping the 'echo' into the cat:
| :0h
| * ^TOfaq
| * !^X-Loop: swsim(_at_)swsim\(_dot_)com
| | (formail -rA"X-Loop: swsim(_at_)swsim(_dot_)com" ; \
| echo '' | cat $HOME/www/faq.html - $HOME/.signature) \
| | $SENDMAIL -oi -t
| That should be more efficient than two cats, though less so than the
| echoless version, of course.
The thud of Philip's gauntlet echoes off the project walls.
:0h
* ^TOfaq
* !^X-Loop: swsim(_at_)swsim\(_dot_)com
| (formail -rA"X-Loop: swsim(_at_)swsim(_dot_)com" ; \
sed -e '$ !b' -e /./G \
-e "r $HOME/.signature" $HOME/www/faq.html) | $SENDMAIL -oi -t
There are more than one way to skim a cat.
[For the pun-impaired: of course the aphorism is "There's more than one way
to _skin_ a cat." `Skim' was intentional.]