0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ターミナルでコマンドの実行が終わったら音を出して知らせる

Posted at

はじめに

実行するコマンドの処理が長くて、終わったら知らせてくれる方法無いかなと思ったので実験してみました。

sayコマンド

sayを使うと指定したテキストを読み上げてくれます。
以下を実行するとテストと読み上げてくれます。

% say 'テスト'

時間がかかるコマンド+sayコマンドで解決出来そう

今回はpod installの処理が終わったら知らせてくれるようにします。

% pod install ; say '終わり'

pod installが終わったら終わりと読み上げられました。出来た!

余談

はじめに&&で出来るやろ!と思ったんですが、pod installが成功した時しかsayコマンドが実行されないのでダメそうです。
失敗した時もsayは実行して欲しいので。。。

pod install && say '終わり'

最後に

他にも良い方法あれば教えてくださーい!
長い処理するときにこのやり方使っていこう!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?