Re:Ask HN: How can I get better at bash?
by soveran on Monday June 26, 2017 @06:07AM
(#14635509)
For scripting, I recommend the rc shell from plan9, which is the one I use for my shell scripts. It is only when I want to share a script with other people that I consider using /bin/sh, and even then more often than not I've gone for rc.
I invite you to read about it: http://doc.cat-v.org/plan_9/4th_edition/papers/rc.
I find the control structures simpler and more elegant, and overall its design feels more consistent. For example, consider an if statement in bash:
And now in rc: Or a case statement in bash: And expressed in rc: In the past, I've used it as my shell too, but now I use it only for scripting. I think you can install it in most platforms.