Exterminate all bashisms and silence shellcheck false positives

Down with bash! :-1: