@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.
This is the best way. It’s also the way the Shellcheck wants them.
@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.
This isn’t true. Shellcheck doesn’t insist on braces unless it thinks you need them.
Oh! I didn’t know that (um, obviously lol)
I’ll edit my comment.