BASH   39
latter in
Guest on 26th August 2023 11:57:26 AM


  1. case "$letter" in
  2.         [D-Z] | [d-z])
  3.         echo "You entered $letter"
  4.         ;;
  5.  
  6.         B|b)
  7.         echo "You entered a b"
  8.         ;;
  9. #note how the program will accept an upper or lower case c
  10.         C|c)
  11.         echo "You entered a C"
  12.         ;;
  13. #here is if you entered an a
  14.         A|a)
  15.         echo "You entered a A"
  16.         ;;
  17. #the following * matches anything not found in the first 3 cases
  18.         *)
  19.         echo "You did not enter an A, B or

Raw Paste

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