mercredi 6 janvier 2021

how can i add a command to put any value on an argument to echo invalid input

i have to keep the yes and no choice but i want to put something that if i don't type yes or no to show that this is not possible i am new to this and not sure what to do

echo "Do you wish to Exit?(yes/no)"
read input
if [ "$input" == "yes" ]
then
clear
exit
elif [ "$input" == "no" ]
then 
clear 
echo "Reloaded"
echo -e "\n"
elif [ "$input" == * ]
then
echo "Invalid Input"
fi ;;

Aucun commentaire:

Enregistrer un commentaire