I have simple below script
#!/bin/bash
RESPONSE=`jq '.errorCode' /data/logs/errorLog.log`
echo $RESPONSE
if [[ "$RESPONSE" = "INVALID_API_CREDENTIALS" ]]
then
echo "Registration unsuccessful..."
else
echo "Registration successful..."
fi
Output
root@ubuntu-test:/data/logs# ./test.sh
"INVALID_API_CREDENTIALS"
Registration successful...
root@gubuntu-test:/data/logs#
Why else block is executing here?