The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers > Answers to Frequently Asked Questions > How do I send email?
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 04-19-2004
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,189
You can create a shell script and test to see if it executes without error. If it executes without error, then you can email a success message; if with error, you can email an error message.

Take a look at error codes, for example:

ps aux | grep grep | grep -v grep ; echo $?

Then try:

ps aux | grep grep; echo $?

Are the results the same? Why not?