case "$action" in
a|b)
echo for a or b
;;&
b|c)
echo for c or b
;;&
*)
echo for everything ELSE
;;&
esac
So, as you can see, I'm using ;;& instead of ;; so that if action=b it will trigger both of the first two cases.
However, a drawback of this is that *) no longer 'means' "everything else", but will match "everything" instead; thus b will trigger the final one also.
PowerShell is able to do what I want because it has a dedicated default keyword, does Bash have something similar?
What about an exhaustive work-around like [!(a|b|c)]) or something?
It would have been handy to do something like case 5 in 4) echo bob; ;;& esac || echo DEFAULT but case doesn't seem to return any code.
From bash manual:
Maybe such idea: