POSIX shell: simulate functions