#!/bin/bash
MESSAGE="Line one. /n"
MESSAGE="$MESSAGE Line two. /n"
MESSAGE="$MESSAGE Line three."
echo $MESSAGE | mail -s "test" "[email protected] /cdn-cgi/l/email-protection"
我应该这样让每一行都在自己的行上吗?
Use a heredoc http://tldp.org/LDP/abs/html/here-docs.html.
mail -s "test" "[email protected] /cdn-cgi/l/email-protection" << END_MAIL
Line one.
Line two.
Line three.
END_MAIL
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)