Remove bashisms from some of the shell scripts

fixes #7685

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>