For anyone else writing bash shell scripts and you run into syntax errors, they may want to check out shellcheck.net comes in handy :)