Thanks for response. Already running like that. Still I do not like it.
Code:
if [[ -s $dbmsprofile ]]; then
. $dbmsprofile
if [[ $? -eq 0 ]]; then
echo "Success" >>$today_file
else
echo "Failed" >>$today_file
print "Error: DB profile could not be loaded\nDatabase : $db_name\nInstance : $db_inst\n" >alert.msg
send_alert sgill.dba@gmail.com alert.msg
fi
else
echo "not found" >>$today_file
print "Error: DB profile could not be found\nDatabase : $db_name\nInstance : $db_inst\n" >alert.msg
send_alert sgill.dba@gmail.com alert.msg
fi
Definitely there will be numerous others that may fail when my script goes in client's hands.
This way I cannot handle the error effectively. I need the the script to continue even after the command fails.
Thanks for the response anyways.
Regards
DBFinder