Mail with attachment from Shell

Today, for a specific need, I had to work with logwatch. After setting up logwatch, I needed to check the logwatch reports. But I can’t wait for it to mail me at next mailing time. But I can generate the report to see on screen by

logwatch –print

But it was too big! So, I redirected the output to a file by running:

logwatch –print > logwatch.txt

But still I am not comfortable reading such a big file from shell. So I thought to mail it. I wondered how! If I am not wrong, mail command can’t send attachment. Even I did not found anything in manual of mail command. So, started googling. I came to know about Mutt. After using it I see it is awesome and very easy. Continue reading →