At times you need to specify different courses of action to be taken in a shell script , depending on the success or failure ...
www.tldp.org