So I was trying to learn Shell Script if else statement. copied this code from internet and it seems... not work properly????????? not really sure what went wrong from here
#!/bin/bash
clear
echo "Enter password"
read pass
if [ $pass="password" ]
then
echo "The password is correct."
else
echo "The password is incorrect, try again."
fi
Expected output should be : Password is incorrect
Instead I get : Password is correct