removed bashisms

just some cleanups to remove dependency on /bin/bash