$ echo -e "From: me\n\n$(tail -n1 /var/log/apache2/error.log)" >> file
June 21, 2012, 8:18 p.m.
—
kevin
Explanation
-e
option to echo makes it interpret '\n' as a newline
$(command)
syntax runs a command, then uses its output in place
Limitations
The -e
flag of echo
doesn't work on all systems.
In that case you can use printf
instead.