When I run a command or script and pipe it to mail, how do I add a subject line to the mail?
For example:
rsync -av /home/ /b/home | mail
email@gmail.com
This will send the output, but without a subject line. Also, what if want to add some text in the body before the contents that are piped?