redirect - redirection bash: content from variable, not from file -
I am using Math to create and send mail with a Bish script.
By the way:
$ mutt -s SUBJECT MAIL_TO_ADDRESS & lt; BODY_CONTENT_FILE
So I always have to write a file before calling Mutt, is there a way to pass information directly from the script or shell variables?
Sure.
For literal content, you can use the document here:
mutt -s "$ SUBJECT" "$ ADDRESS" & lt; & Lt; The EOF body of the message goes here and unless you have a line with the Terminator,
In this case, the Lieutenant; & Lt; `Note that the parameter will be expanded here-in the document such that it was a double-quoted string, as long as you were using the Terminator (for example If it is a short message, or is already a variable, using the here-string instead is easy:
mutt -s "$ SUBJECT" " $ ADDRESS "& lt; & Lt; & Lt; "$ BODY"
Comments
Post a Comment