時間制限付きでコマンドを実行する
How to run a command with a timeout so that it is killed if it exceeds the timeout threshold?
timeout(1)を利用する
Bash Cookbookという本の例にあるスクリプトを利用する
http://www.bashcookbook.com/bashinfo/source/bash-4.0/examples/scripts/timeout3