LoginSignup
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

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
What you can do with signing up
26