Help Required For String Matching

I am new to shell scripting !!!!!!!!!!.ANY HELP WOULD BE APPRECIATE :-
i want to write a script that will check the log for string:
waiting for [10] seconds

for this I am using :-

tail -10 log.20101004 | tail -1

and grep the "string" but when matching error is coming ,see script below:-

i want to kill that process if matching pattern came,

LOG_PATH=/temp/circles/ABHI/LOGs
DATE=`date +%Y%m%d`
LOG_NAME=gprs_cdr_parser_log.$DATE
PID=`ps -eaf| grep del_gprs_cdrs_parserd | grep -v 'grep' | awk '{ print $2 }'`
cd $LOG_PATH
VAR=`tail -10 gprs_cdr_parser_log.20101004 | tail -1 | awk '{ print $2 }'`
if [ $VAR = "Waiting" ]
then
echo " Restarting the gprs parserd process"
kill -9 $VAR
else
echo "Processed picked the file ,not restrting "
exit 0;

error::-

+ LOG_PATH=/temp/circles/ABHI/LOGs
++ date +%Y%m%d
+ DATE=20101004
+ LOG_NAME=gprs_cdr_parser_log.20101004
++ grep del_gprs_cdrs_parserd
++ ps -eaf
++ grep -v grep
++ awk '{ print $2 }'
+ PID=13137
+ cd //temp/circles/ABHI/LOGs
++ tail -10 gprs_cdr_parser_log.20101004
++ tail -1
++ awk '{ print $2 }'
+ VAR=Waiting
gprs_cdr_parser_restart.sh: line 16: syntax error: unexpected end of file

You forgot fi