Looping to check the currently running process.

Hi Gurus,

t=`ps -u irb|grep -v grep|grep BSNL_PAYMENT_C`
echo $t
if [ "$t" ]
then
    echo $?
    echo "Process Creation is Running ...."
    else
    echo "Process went down at $dat $tim" 
fi

How would i use loop so that the script continously checks for the current status of this process. Suppose that i have run the script and after 30 minuts this BSNL_PAYMENT_C process completed. then script will intimate me that this process has been completed at time xyz ...

Waiting for ur response mastersssssss ......

Try something from this link

How to notify when the process is completed in unix - dBforums