shellシェルスクリプトでコマンドの存在を確認する2020年10月13日if ! type gem > /dev/null; then echo 'gem command not found.' fi