So I am having a problem understanding how to loop a condition. Here is my example:
#!/bin/bash
echo " Which team do you prefer, FSU or UF?"
read -r TEAM
while [ "$TEAM" != "FSU" || "UF" ]; do
echo "That was not one of your choices. Please choose FSU or UF"
if [ "$TEAM" == "FSU" ]; then
echo "You chose the better team"
else [ "$TEAM" == "UF" ];
echo "You did NOT choose the better team"
fi
done
Basically, what I am looking for is user input and if that condition isn't met it would loop back until the correct input is met. What am I doing wrong? In this example I get an error back if I choose an input outside of FSU or Uf as:
"./test.sh: line 4: [: missing `]' ./test.sh: line 4: UF: command not found"
However, if I choose FSU or UF I get the same error.