I am getting the following output when comparing 2 strings...
String 1 is : 1702
String 2 is : 1702
./test2.sh[9]: [1702: not found
Strings NOT equal
my code is as follows....
Can someone please tell me what I'm doing wrong
String 1 is : 1702
String 2 is : 1702
./test2.sh[9]: [1702: not found
Strings NOT equal
my code is as follows....
Code:
#! /bin/ksh
STRING1="1702"
STRING2="1702"
echo "String 1 is : $STRING1"
echo "String 2 is : $STRING2"
if ["$STRING1" = "$STRING2"]
then
echo "\nStrings equal"
else
echo "\nStrings NOT equal"
fi
Can someone please tell me what I'm doing wrong