我想在 awk 中运行 sendmail 命令,但出现以下错误。
awk 命令
awk '{ split($0,array,"@"); gsub("\."," ",array[1]); system("sendEmail -f foo@boo.com -t " $1 "-u \"Hello from command\" -m \"Dear\ " array[1] \"-s smtp.boo.com:587 -xu khikho -xp khikho"}' email_list.txt
错误:
syntax error near unexpected token
('`
email_list.txt 头:
user.1@boo.com
user.2@boo.com
user.3@boo.com
先感谢您。