|
The steps needed to create this script would likely be:
1. create two messages, one for the error state, one for the non-error state.
2. decide whether there is an error
3.a. if error pipe the error message to the mail command
3.b. if not pipe the non-error message to the mail command
as a hint the mail command could be:
mail -s "subject line of mail command" address <message.file
Try writing a script with those steps, and see how it goes. If/when you have trouble come back and ask, posting what you have written so far.
|