I'm trying to do something like this:
case $level in
3)
echo "Level Three"
2)
echo "Level Two"
1)
echo "Level one"
;;
esac
where if $level = 3, it would output
Level Three
Level Two
Level One
while if $level = 1, it would output only
Level One
But when I try it, I get the error syntax error near unexpected token ')' because I didn't include the ;;.
Every other language I know of allows this, is there a way to do it in bash? Some sort of keyword that means "now go on and do the next case as if it matched"?
caserequires an explicitbreak; ridiculous. Moreover, the very few reasons that I did see, because "it's easy to forget thebreak" is plain wrong, and because "I don't like it" is irrational.