is there any way to check or test the input from a 'read' against a for 'loop'?I don't want the case statement to execute there any of the input is incorrect. As of right now it will loop through, outputting the * ) branch multiple times while still executing the correct inputs.Example:echo Select Your Options (Seperated by spaces): 1 2 3read SELECTION     # Test SELECTION here? Then exit if fail? IE, if a 4 is entered.for INPUT in $SELECTION; do    case $INPUT in                   1 ) echo you selection option 1                       ;;                   2 ) echo you selection option 2                       ;;                   3 ) echo you selection option 3                       ;;                   * ) echo Check your selection. Anything outside the following will make this fail:  1 2 3                        RETVAL=1                       exit                                 ;;     esacdone
Check Input Prior to Executing a for loop
bash;shell script;scripting