I’m fairly certain the *) option in the case statement never executes if the case statement is embedded inside a select statement.
PS3=$'nEnter one above: '
count=0
select rb in "varone" "vartwo" "Exit"; do
[[ $count -ge 3 ]] && break
case $rb in
varone)
echo "bingo";;
vartwo)
echo "bango";;
Exit)
break;;
*)
((count++))
esac
done
That being said, is there any way to accomplish what my code is attempting i.e. just keep a count of empty responses and exit if like in my example 3 such responses?