Recently I got really interested in debloating and hardening my operating systems, cause I’m heavily inspired by Unix and “worse is better” philosophy. As I heard bash is heavy and we have much more lightweight and faster alternatives like these mentioned in title. They must be great alternative for scripting and interpreting but is there any reason to use them on my machines as interactive shell? Anyone are using them? Also is it worth to learn them as bash is standard IT industry?


I do write my scripts in POSIX sh, more for compatibility sake. But shells like dash, mksh, are not made for interactive use, they lack most not-really-convenience features.
But heavy, that’s only invocation time; it mathers more if you do things like 100 awk calls (that one is heavy to invoke) per line you parse.
Though i did write my own cross-shell session scripts, centering on the ENV variable which most shells understand (and a /etc/bash/bashrc loading it, since Bash doesn’t).
Again, more because i think, why load xkb maps 3 times in 3 scripts if you can do it only once? And most session scripts look like they were never touched the last 20 years. And then a if you do it, do it right mindset.
Worth learning; i think so. You learn, with time, more about how to use shorthands and functions, to structure your scripts nicely, instead of doing if if if messes more “convenient” shells lead you to. Which benefits you in real programming languages too and leads to more readable and better maintainable scripts.
And the only times i miss convenience features like arrays is in 500+ loc scripts which would have better been done in python. Btw, don’t do 500+ loc shell scripts: they do become a maintenance mess even if you do everything right.
Edit: right, i forgot the POSIXLY_CORRECT env variable. Some AUR setup-scripts have issues with a forced POSIX shell.