So recently I was doing doing some bash scripting and required a functionality that would allow my script to wait for for a trigger file in order to execute. After some thinking, I was able to some up with a function to perform the required action.
How to Send Email – Unix Shell Snippet
I’m sharing two code snippets that will send an email. These snippets accept three parameters: a subject, an email address and a text file containing the email message.