I just want to comparate 2 strings in shell. Here is the code below :
test1="tata"
test2="toto"
if [ $test1=$test2 ]
then
echo "equal"
else
echo "not equal"
fi
It must be return "not equal" but it returns "equal" whatever i'm writting in test1 and test2...
i've tried with those conditions below too:
if [[ $test1==$test2 ]]
if [[ "$test1"=="$test2" ]]
if [ "$test1"="$test2" ]
but it does the same...
I'm just gonna get made!
Can somebody help me ?