What does >& mean here?

2019-08-09 22:52发布

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

What does >& mean in this context? Both files syn.par and log.syn contain parameters for pstomo_eq.

标签: linux bash
1条回答
Fickle 薄情
2楼-- · 2019-08-09 23:32

Redirect stderr and stdout

>& is equivalent to &> and redirects both standard error and standard output.

From the bash man page:

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

In your question, stderr and stdout are redirected to log.syn

查看更多
登录 后发表回答