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.
我需要每周发送一封电子邮件,其中包含一些将收集在 txt 文件中的动态信息。我无法完成的是将该文件的内容添加到我的电子邮件主题中。我的文件名为 bkp.txt 并且有一行“每周备份;总计:10;大小:3gb”
有什么办法可以使用这种格式发送电子邮件
mailx -s "weekly backups; total: 10; size: 3gb" "email.address@domain.com" < another.txt,记住bkp txt的内容每周可以修改吗?
谢谢!
使用bash命令替换:
bash
mailx -s "$(<bkp.txt)" ......