171
130

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 5 years have passed since last update.

bashで標準出力と標準エラー出力の一括リダイレクト

Posted at

詳細はman bashで。

Redirecting Standard Output and Standard Error

標準出力と標準エラー出力を一括してリダイレクト。これは相当前からある機能。

command &> file
若しくは
command >& file
で以下と同じ効果となる
command > file 2>&1

Appending Standard Output and Standard Error

標準出力と標準エラー出力を追記形式でリダイレクト。
これはbash 4.0からの機能。RHEL/CentOSのデフォルトrpm的には6.0から。

command &>> file
以下と同じ効果となる
command >> file 2>&1
171
130
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
171
130

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?