replace Bash code snippets with plain shell