Need Help on String Comparison

Hi ,
My requirement is to read from a file into a variable.
I need to check if the variable is equal to string "no rows selected".
The sh script snippet is as follows:

 
file=/data/lpgtwo/home/nikhilp/TriggerNames.txt
echo $file
var=`cat $file`
echo $var
if [  $var == "no rows selected" ]
then
        echo "No Triggers to disable"
        exit 1;
fi

On the execution of the above I get test: unknown operator rows

I am new to shell script. Can some one please let me know where am I going wrong.

It is not '==', it is '=' to compare a string in bash.

#!/bin/bash

var="test";

if [ $var = "test" ]; then
    echo "Matched..";
else
    echo "Not matched ..";
fi


I am using sh script not bash.
I tried as you suggested still getting the same error

bash is often (unfortunately) linked to /bin/sh and/or /usr/bin/sh.

What operating system are you using?
What does echo $BASH_VERSION return?
What does echo $(KSH_VERSION} return?
What does echo ${.sh.version} return?