I wish there was a nicer shell scripting language that simply transpiled to Bash and would generate all this boilerplate code for me. There is
https://batsh.org/ which has a nice syntax but it doesn't even support pipes or redirection, making it pretty worthless for shell scripting. I haven't found any other such scripting languages.