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.
我正在使用命令
cat ~/2014-02-06_BP.txt | mailx -s "formatted file content" myemail@mydomain.com
我相信mailx在fmt内部使用。我想将 fmt 宽度参数更改为fmt -s -w160.
fmt
fmt -s -w160
ps:这是在 Fedora 20 上
mailx 几乎可以肯定不会对其中的输入进行任何格式化。
您最好的选择是在发送到 mailx 之前在输入上运行 fmt,例如:
fmt -w 160 file.txt | mailx -s 'your data, formatted' somebody@someplace