I'm trying to get user input. The input should be "1" or "2". for some reason I keep getting prompt even when I type 1 or 2.
read -p "Your choice: " UserChoice
while [[ "$UserChoice" != "1" || "2" ]]
do
echo -e "\nInvalid choice please choose 1 or 2\n"
read -p "Your choice: " UserChoice
done
I'll appreciate your help Thanks!