modify the shell script's snippets to fit the POSIX standard