Remove some bashisms
Thanks to Zlo