Don't know where you get that idea. You must be running some crazy version of bash. I have several scripts that rely on "==" or "!=".
Most typically to run the script one way if root, another if regular user
Code:
if [[ "$USER" == root ]] ; then
do root stuff here
else
do user stuff here
fi
works great.