SHELLdorado - Sending files as mail attachments
ALOT of times i find myself on another system and needing desperately to retrieve a log file to send to someone for further inspection. in the old days (before this afternoon) i would usually end up tar-ing the file scp-ing it to my machine, then emailing it to whoever needed it…
i came across a cleaner solution this morning..
at the link above, they go over some really cool command line uses for mail. read the above link if you are interested in doing something like this on a regular basis..
i ended up using the mime section… and my command line when something like:
mutt -s "serverlog file" -a serverlog.txt.gz address@email.com
the only caveat is that mutt will open, and want some input for a body, it opens it in vi, but that’s not that big of a deal.
i thought about making a dummy text file, if i have to do this very often, but i doubt it, as you would have to keep this text file in the same place all the time.
hopefully, i won’t have to be sending this text file too many places..