Comparing Alphanumeric Variables in Shell Script

Can someone please help me out here?

I have strings similar to aafafaff45,29.34.942.45,edfdfafa that i want to compare to another similar string to check if they are the same. my script isn't working.

ONE="aafafaff45,29.34.942.45,edfdfafa"
TWO="ddfafagfa,87.57.942.45,afafafff"

if ONE is the same as TWO, the script i wrote is suppose to echo out a 0. but it is echoing out a 2.

if [ "$ONE" == "$TWO" ]; then
 echo same
else
 echo different
fi

Script ? Where ?

Maybe you show your script so we can correct it. If the complete string should be tested you can use something like

ONE="aafafaff45,29.34.942.45,edfdfafa"
TWO="ddfafagfa,87.57.942.45,afafafff"
#TWO="aafafaff45,29.34.942.45,edfdfafa"

if [[ "$ONE" != "$TWO" ]]; then
        echo 1
else
        echo 0
fi
#!/bin/sh

RESULTS=$(curl -s "http://1444.66.44.293:7760/datalocation?transaction_id=126454545454&account_number=45454183521&date_start=1262968108&date_end=1262968108&im=false" | sed 's/,//g')

EOUTPUT=$(echo 1,1,0,1041379200,18446744071500476416,REG,CDR,ORACLE,cdr,10.255.255.11 | sed 's/,//g')

#echo $RESULTS > /tmp/nagios_datalocation_results.txt
#echo $EOUTPUT > /tmp/nagios_datalocation_eouput.txt
#exit


if [[ "$RESULTS" != "$EOUTPUT" ]] ; then

        echo "2"
        exit 2
else
        echo "0"
        exit 0
fi

So basically, even though the contents of both $RESULTS and $EOUTPUT are the same, this shell script isn't recognizing that and is aborting with a 2. rather than a 0.

please echo both the values and post the o/p.

echo "$RESULTS"
echo "$EOUTPUT"

if [[ "$RESULTS" != "$EOUTPUT" ]] ; then

        echo "2"
        exit 2
else
        echo "0"
        exit 0
fi