@hascat There are cleaner approaches or drastically different ones. Because of legacy AND for sharing reasons, we need Bash. Then you learn either Bash+Cleaner_Approach or just Bash. The only way to break this is by starting from scratch and forcing it as the default. Which is not gonna happen for Linux for a long time. At least according to me.
@bloopernova As you mention it, here the links for anyone interested: Online tool https://www.shellcheck.net/ and you can install it locally too https://github.com/koalaman/shellcheck .
While this looks like a handy tool, it does make me think shell scripting itself needs a cleaner approach than what we have currently.
@hascat There are cleaner approaches or drastically different ones. Because of legacy AND for sharing reasons, we need Bash. Then you learn either Bash+Cleaner_Approach or just Bash. The only way to break this is by starting from scratch and forcing it as the default. Which is not gonna happen for Linux for a long time. At least according to me.