I both love and hate writing Bash. I love that it\'s so streamlined for operating on files and working with processes (I agree with this popular question that it\'s way
You might want to take a look into nscript, in which you can write shell scripts using javascript. All the common bash constructions are in there, like exit codes, pipes, stream redirects, argument expansion, globbing, prompt etc.