0
2

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 1 year has passed since last update.

【linux】.sh実行結果をログファイル出力する(特にpython系)

Last updated at Posted at 2022-06-03

結論

リリースを始める前に下記のコマンドを流す

script -f >(awk '{print strftime("%F %T ") $0}; system("")' >> operation_log_$(date +%Y%m%d%H).ansi)

すると、移行のコマンド結果が時間付きですべてファイルに出力される。

shellの実行結果をログファイル出力する。
リリース時に重宝する。
ターミナルの結果が消えても安心。

0
2
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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?