David Gikandi wrote,
| When I use formail -rtk ... cat $FILE, I get the body
| of the incoming message quoted at the top of the reply
| sent out, then the $FILE contents. How can I get it
| quoted at the bottom instead, so that the $FILE
| contents come first, then the quoted body?
There are a couple approaches.
:0fh # invert head and append file to it, leaving body untouched below
| formail -rt ; cat $FILE
or, if you want to avoid forking shells,
:0fh # invert head
| formail -rt
:0fb # prepend file to body; note trailing space and hyphen
| cat $FILE -
or if you like annoying other people who have to maintain the code you write,
:0f
| formail -rtk | sed -e 1,/^$/!b -e "/^$/r $FILE"