Using the 'mail' command to mail a file
Hello all. I have a question that I imagine will be very easy for somebody. I have created a small script that will check my mysql database for any corruption. The script is a cron job and will run once a week. Here is the script:
#!/bin/sh
MYISAMCHK=/usr/bin/myisamchk
#Clear Old Contents Of pulseofac_db.log
cat /dev/null > /var/log/pulseofac_db.log
#Check MyIsam Tables
$MYISAMCHK --fast /var/lib/mysql/pulseofac/*.MYI >> /var/log/pulseofac_db.log
As you can see its fairly straight forward. The output of the myisamchk is concatenated to a text file. I would like to make it so that this text file gets mailed to root@localhost once a week as well. I couldn't find what I was looking for in the man pages of the 'mail' command.
How can I specify a text file to be the subject of the e-mail?
|