我有已编译的 C 代码。然后我必须从命令行执行
../../../PStomo_eq665/pstomo_eq par=syn.par >& log.syn
在这种情况下,>&
是什么意思? syn.par
和 log.syn
文件都包含 pstomo_eq
的参数。
最佳答案
重定向标准错误和标准输出
>&
等同于 &>
并重定向标准错误 和标准输出。
来自 bash man页:
There are two formats for redirecting standard output and standard error:
&>word
and
>&word
Of the two forms, the first is preferred. This is semantically equivalent to:
>word 2>&1
在你的问题中,stderr 和 stdout 被重定向到 log.syn
关于linux - 这里 >& 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34900604/