9 ms·
That's neat but doesn't `case` support fallthrough? So I expect you could just put your script in one big `case` statement and skip to the branch you need.
by t0astbread 3y ago
That's neat but doesn't `case` support fallthrough? So I expect you could just put your script in one big `case` statement and skip to the branch you need.
- js2 3y agoI didn't think so but it turns out it was added with Bash 4.0 (released Feb 2009). Instead of terminating the case with ";;", you terminate it with ";&" for fall through. https://git.savannah.gnu.org/cgit/bash.git/tree/NEWS#n1267 https://git.savannah.gnu.org/cgit/bash.git/tree/NEWS#n1267