swremove unsuccessful case handling

Go4Expert Member
27Mar2008,09:44   #1
rag84dec's Avatar
i am using the command "swremove productname".... How can i check the unsucceful condition?.... i want to say "if unsuccessful display that message to the user and exit"....

Can anu one help me??.... i am coding in this script for the first time so please dont mind...

THanks
Team Leader
27Mar2008,10:24   #2
pradeep's Avatar
$? contains the exit status, 0 means normal termination, any value greater than 0 means abnormal termination.