yank: make it more portable to work in POSIX shell