A
common use for e-mail is sending reports or other text documents.
These can be tedious to retype, especially if they are lengthy.
To save time you can combine your knowledge of redirection (from
chapter 5) with the mail command to send a text file without retyping
it.
In this example
we will redirect the standard input to the mail command from the
file payroll.txt. The -s option is used to supply a subject right
at the command line:
$ mail
-s "Payroll Info" user3@saturn < payroll.txt
$