出力
stdout
$ command >&1
stderr
$ command >&2
ファイル出力
stdoutをファイルに
$ command > file
stderrをファイルに
$ command 2> file
stdout/stdinどっちもファイルに
$ command > file 2>&1
bash依存系
stdout+stdin ファイル出力省略系
$ command &> file
$ command &>> file (append)
stdout+stdin パイプに渡す
$ command1 |& command2
標準エラーだけパイプに渡す
$ command1 > /dev/null |& command2
noclobber 環境下での強制上書き
$ command >| file