11-07-2008
48,
0
Join Date: Apr 2008
Last Activity: 28 May 2016, 1:33 AM EDT
Posts: 48
Thanks Given: 1
Thanked 0 Times in 0 Posts
For Radoulov
Hi ,
I have got your reply but i have this condition .AS my database is down for more than 6 hours on a particular sunday of the month so i am checking its availability.
for i in 1 2 3 4
do
Get_Mv_Count #fetches the value from remote DB
case $TR in
"" | *[!0-9]* ) printf "database is down as it returns : %s\n " "$TR";;
sleep 10
continue
* ) (( $TR > 0 )) && printf "OK\n " || printf "KO\n";;
echo "DB is up and run your script here "
exit
esac
done