BASH   36
yes no
Guest on 26th August 2023 11:58:10 AM


  1. echo please enter yes or no
  2. read yesno
  3. case "$yesno" in
  4.         y|Y|yes|Yes)
  5.         echo "You entered yes"
  6.         ;;
  7.  
  8.         n|N|No|no)
  9.         echo "You entered no"
  10.         ;;
  11.         *)
  12.         echo "You did not enter a yes or no"
  13.         exit 10
  14.         ;;

Raw Paste

Login or Register to edit or fork this paste. It's free.