remove bashisms for extended portability