我想知道以下两个命令之间的区别
2>&1 > output.log
和
2>&1 | tee output.log
我看到我的一位同事使用第二个选项进行重定向。我知道 2>&1 是做什么的,我唯一的问题是在可以使用简单重定向“>”运算符的情况下使用 tee 的目的是什么?
shell pipe io-redirection
io-redirection ×1
pipe ×1
shell ×1