I created two scripts. The firsts collects a lot of data and orginizes it just the way my boss wants it. That one works great. Now I want to save the output to a dated file, print out that file and email it to me as an attachment so I can look it over and send it wherever it needs to go. Everything works fine but the email portion of the script
Here is the script (sans personal info)
Code:
#!/bin/bash
_now=$(date +"%Y_%m_%d")
_file="server_status_$_now.txt"
/home/user/reports/report.sh > /home/user/reports/"$_file"
lp /home/user/reports/"$_file"
echo Status Report for "$_now" | mutt -a /home/user/reports/"$_file" -s "Status Reports" my.email@my.job
When I run this script I get a printout exactly how I want it, however, I also get an error message:
Code:
Can't stat my.email@my.job: No such file or directory
my.email@my.job: unable to attach file
I bet it is something stupid like I missed some quotation marks or a slash or something like that