Hey, not sure if this is the best place however thought id ask my question ..
My while loop below doesnt return as id expect :
while [[ ! "$RES" =~ (1|2|3|4|5|6|7|8|9|x|10)$ ]]
do
read -p "Please select an above option : " RES || exit
done
if [[ "$RES" =~ 1 ]]
echo "Option 1 Selected"
and so on through all my results
This goes on and works all the way up to 10.
If i select option 10 it runs option 1.
Any idea how to make sure when i select option 10 it runs it not 1.