How do I attach file using command line mail I've used Suse Linux in before and it has a "-a" option to attach a fileeg.echo Test Completed at `date` | mail -s "Test email" -a /home/test.log me@mydomain.com(date is set at top of the script)
I've sorted it myself...My file is a Text file so ... echo Test Completed at `date` | mail -s "Test email" -a /home/test.log me@mydomain.com < /home/mytextfile.txt
( echo Test Completed at $(date); cat /home/mytextfile.txt ) | mail -s "Test email" me@mydomain.com