標準出力は捨てて標準エラー出力だけパイプにつなぐ
コマンド 2>&1 >/dev/null | 次のコマンド
レイダイレクトナンモワカラン
@zundan 本当に紛らわしいですね
この説明でいいと思います:
https://stackoverflow.com/questions/17975232/shell-redirection-i-o-order/25259518#25259518
Confusions happen due to a key difference. > redirects not by making left operand (stderr) point to right operand (stdout) but by making a copy of the right operand and assigning it to the left. Conceptually, assignment by copy and not by reference.
@calchan うーん、なるほどー。Assignmentが右(> /dev/null)から左(2>&1)に進んでいくのも同様に理解すればいいいのかな…