>&是什么是这里吗 [英] What does >& mean here?
问题描述
我有已编译的C代码.然后我必须从命令行执行
I have C code, that has been compiled. Then I have to execute from command line
../../../PStomo_eq665/pstomo_eq par=syn.par >& log.syn
在这种情况下>&
是什么意思?文件 syn.par
和 log.syn
都包含 pstomo_eq
的参数.
What does >&
mean in this context? Both files syn.par
and log.syn
contain parameters for pstomo_eq
.
推荐答案
重定向stderr和stdout
>&
等效于&
,并重定向标准错误和标准输出
Redirect stderr and stdout
>&
is equivalent to &>
and redirects both standard error and standard output.
从bash的 man 页:
有两种格式可用于重定向标准输出和标准错误:
There are two formats for redirecting standard output and standard error:
&>单词
和
>& word
在两种形式中,第一种是首选.这在语义上等同于:
Of the two forms, the first is preferred. This is semantically equivalent to:
>单词2>& 1
在您的问题中, stderr 和 stdout 被重定向到 log.syn
In your question, stderr and stdout are redirected to log.syn
这篇关于>&是什么是这里吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!