/bin/sh solution for http://gihyo.jp/dev/serial/01/codeiq/0001