Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用mailx时如何重命名电子邮件中附加的文件?此外,想知道是否可以在附件中添加日期。
例如:cat /home/msgsubject.txt| mailx -r someone1@somewhere1.com -s "电子邮件" -a /home/auto.log someone2@somewhere2.com
所以在这里我希望看到附件 auto.log 附加为 auto_02272015.log
谢谢
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