Bash Scripting - User Input
Find the error in this script snippet:
echo "Enter your choice:"
read choice
if [ $choice = "yes" ]; then
echo "Confirmed"
fi
echo "Enter your choice:"
read choice
if [ $choice = "yes" ]; then
echo "Confirmed"
fi
$choice should be quoted to avoid errors if empty or spaces.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions