LoginSignup
0
1

More than 5 years have passed since last update.

bash: 標準出力、標準エラー出力、標準出力+標準エラーをファイル、画面それぞれに出力する方法

Posted at

はじめに

Qiita記事であるbash: 標準出力、標準エラー出力をファイル、画面それぞれに出力する方法
標準エラー出力⇒ファイル1、標準出力⇒画面(標準出力)、標準エラー出力⇒ファイル2、標準エラー出力⇒画面(標準エラー出力)を応用してみた。

備忘録を兼ねて共有。

コマンド

$ { { { bash stdout_and_stderr.sh | tee stdout.log; } 3>&2 2>&1 1>&3 | tee stderr.log; } 3>&2 2>&1 1>&3; } 2>&1 tee stdout_stderr.log

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