Revert "removed bashisms"

This reverts commit de41205bac77362b03d7094073c5773e09c3f3a3.