Handling Errors and exceptions of commands
I execute a command in bash shell script
eg a server maintenance command: srmt ... .... ... how to catch error if this command returns ERROR: server_exception(MSG_ERR_RECVFAILED) i want to be able to catch this error , not print in the console but handle my own way and give an output of my choice how to do it... |
By checking its return-value and mapping it to a string?
echo $? will give you an idea what the code is ... Cheers, Tink |
All times are GMT -5. The time now is 03:24 PM. |