【问题标题】:How to rename the attachment when using mailx?使用mailx时如何重命名附件?
【发布时间】:2015-05-08 06:18:03
【问题描述】:

使用mailx时如何重命名电子邮件中附加的文件? 此外,想知道是否可以在附件中添加日期。

例如: 猫 /home/msgsubject.txt| mailx -r someone1@somewhere1.com -s "电子邮件" -a /home/auto.log someone2@somewhere2.com

所以在这里我希望看到附件 auto.log 被附加为 auto_02272015.log

谢谢

【问题讨论】:

    标签: linux email date unix mailx


    【解决方案1】:
    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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-10-29
      • 2022-12-16
      • 1970-01-01
      • 2014-08-09
      • 2014-06-04
      • 1970-01-01
      • 2023-03-19
      相关资源
      最近更新 更多