In a script, I need to send the contents of two separate Linux commands in one email. I understand that I can append the outputs of the two commands to a file and send that file as an attachment. However, the script will also be run by other users so they may not have permission to view/edit/send this files. Therefore, I was wondering if there is a way to directly send the outputs of two different commands in one email.
Asked
Active
Viewed 48 times
bash
: Use command grouping, then pipe to your mail solution – Panki Jun 25 '21 at 17:28