Case Statement not matching "*"
bash
Solution
I have found out that I needed to remove the quotes around the asterisk... wow.
Thanks for looking!
Problem
I am writing a bash script. It is menu driven. For some reason, i use a case statement, and after all my options are printed, i use the * to capture anything else the user may type. but for some reason, my output is not being done. Example: ``` while [ 1 ]; do if [ $MAIN_MENU -eq 1 ]; then printMainMenu read option case "$option" in "1" ) printDiskSpace;; "2" ) printFreeMemory;; "0" ) exit;; "*" ) echo "Input not understood.";; esac fi done ``` Now what happens is when I use the menu, if i type 1, 2, or 0 it does the proper thing. but if i typed 55 for instance, it would just redisplay the menu without echoing "input not understood". Am i missing something here? Thanks!