syntax error for if statment test expression

Hi

what's the correct way of writing if

1)if "$time_diff" -gt 5
then
echo "killing hung process \n"
fi

2)if test $time_diff -gt 5
then
echo "killing hung process \n"
fi

where -time_diff=$(($Sam[$n] - $current_min))
and current_min=`date +%M`

infact both are giving Syntax errors..can someone suggest me what is wrong with what i have done

Please read on of the scripting tutorials here:

http://www.unix.com/answers-frequently-asked-questions/13774-unix-tutorials-programming-tutorials-shell-scripting-tutorials.html

Regards