![「[Mac]Automator等のシェルスクリプトでタイムアウトさせるgtimeout」のアイキャッチ画像](/images/tmb/mac-gtimeout.jpg)
Automatorでシェルスクリプトをタイムアウトさせたくて、調べてみたらHomebrewでパッケージを追加する必要があったのでメモ。
{{
Coreutilsを追加して、gtimeout
Homebrew インストール (一応
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Coreutils インストール
brew install coreutils
使い方
gtimeout 秒数 コマンド
しっかり10秒で止まってる。
gtimeout 10 ping google.com
