LoginSignup
8
7

More than 5 years have passed since last update.

標準出力と標準エラー出力をファイルに追記する

Posted at

command

$ hoge.sh 1>>file 2>&1

1

標準出力だよー

1>>file

標準出力をfileに追記しますよー

2

標準エラー出力だよー

2>&1

標準エラー出力の出力先を標準出力の出力先と一緒にしますよー

つまり...

標準出力と標準エラー出力を一緒にfileに追記しますよー

参考

余談

初投稿〜、初Markdown〜

8
7
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
8
7