对导致以下 bash 会话日志的机制的一致解释是什么,有助于获得理解并对类似构建的命令的结果进行可靠的预测:
~ $ cat f
abc123
~ $ cat g
cat: g: No such file or directory
~ $ cat f g 2>&1 >h
cat: g: No such file or directory
~ $ cat h
abc123
和
~ $ cmd >a 2>&1
~ $ cat a
Command 'cmd' not found, but there are 19 similar ones.
~ $ cmd 2>&1 >a
Command 'cmd' not found, but there are 19 similar ones.
~ $ cat a
~ $
?