The UNIX and Linux Forums  


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




Thread: trapping errors
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 11-19-2008
TimHortons TimHortons is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 53
Okay, I want to trap any system error messages that may occur within a unix shell script. When I do a mkdir command and it fails how to trap the error.
When my sqr program fails with "Error! SQR Failed To Process" how to trap the error and exit the shell script with an exit 99