How to rename the file that is being attached in the email when using mailx? Further, wondering to see if it is possible to add date to the attachment.
For example: cat /home/msgsubject.txt| mailx -r someone1@somewhere1.com -s "Email" -a /home/auto.log someone2@somewhere2.com
So here I want see the attachment auto.log to be attached as auto_02272015.log
Thanks
cp /home/auto.log /home/auto_02272015.log
cat /home/msgsubject.txt| mailx -r someone1@somewhere1.com -s "Email" -a /home/auto_02272015.log someone2@somewhere2.com
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.