I want to run sendmail command inside the awk, but I got the error below.
awk command
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
error:
syntax error near unexpected token
('`
email_list.txt head:
user.1@boo.com
user.2@boo.com
user.3@boo.com
Thank you in advance.