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.