>>&表示tcsh脚本中的含义以及它如何转换为bash?

Pet*_*ner 3 bash stdout tcsh stderr

我正在将一个tcsh脚本转换为bash,遇到障碍因为我不完全确定>>&做什么

wget --output-document=/dev/null "http://somewebsite.org" >>& /root/wget.log
Run Code Online (Sandbox Code Playgroud)

我确实阅读了man-page http://linux.die.net/man/1/tcsh,但不确定"诊断路由"是什么意思,可能是stderr ......

所以,只是为了绝对肯定,它是否与做:

wget --output-document=/dev/null "http://somewebsite.org" 2>>&1 /root/wget.log
Run Code Online (Sandbox Code Playgroud)

在一个bash脚本?

tha*_*guy 7

它将stdout和stderr附加到文件中,因此它等效于:

wget --output-document=/dev/null "http://somewebsite.org" >> /root/wget.log 2>&1
Run Code Online (Sandbox Code Playgroud)