while true
do
read -p "Do you want to continue : " yeah
if [ "$yeah" = "y" ]; then
welcome ; accept_student
else
echo "thanks for using this app"
break
fi
When i type something aprt from y, the script exits automatically. That should not be the case. Instead, i should get an error message telling me to press y to continue or n to exit. Some thing like this
while true
do
read -p "Do you want to continue (y/n): " yeah
if [ "$yeah" = "y" ]; then
welcome
accept_student
elif [ "$yeah" = "n" ]; then
echo "Thanks for using this app."
break
else
echo "Please type either 'y' to continue or 'n' to exit."
fi
done
When i type something aprt from y, the script exits automatically. That should not be the case. Instead, i should get an error message telling me to press y to continue or n to exit. Some thing like this