error in bash script 'if' loop

SEND_MESSAGE=test
echo $SEND_MESSAGE
if [ $SEND_MESSAGE -eq test ]
then
echo `date` > update_dt_ccaps.lst
echo "The file transfer failed" >> update_dt_ccaps.lst
SEND_MESSAGE=false
fi

The above code is showing error in bash shell as :
./test: line 5: [: test: integer expression expected

But it was not showing any error in ksh.I am compelled to use the bash shell itself.

Would anyone please advise.

With Regards
Dileep

eq operator is for numerix test, you must use = operator :

SEND_MESSAGE=test
echo $SEND_MESSAGE
if [ $SEND_MESSAGE = test ]
then
   echo `date` > update_dt_ccaps.lst
   echo "The file transfer failed" >> update_dt_ccaps.lst
   SEND_MESSAGE=false
fi

Jean-Pierre.

= is used to string comparison

if [ $SEND_MESSAGE = "test" ]