LoginSignup
27
26

More than 5 years have passed since last update.

コマンド実行に一定時間以上かかった場合処理時間を表示する

Posted at
REPORTTIME=3

上記のように書いておけば,コマンド実行に3秒以上かかったときにtimeコマンドと同じように処理時間を出してくれる

$ ec2-describe-regions
REGION eu-west-1 ec2.eu-west-1.amazonaws.com
REGION sa-east-1 ec2.sa-east-1.amazonaws.com
...
ec2-describe-regions 10.14s user 0.68s system 77% cpu 14.018 total
27
26
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
27
26