The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 08-25-2008
wempy's Avatar
wempy wempy is online now
Registered User
  
 

Join Date: Jun 2006
Location: Harpenden, UK
Posts: 208
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.