Peter Turner
Peter Turner

Reputation: 11435

What does >>& mean in a tcsh script and how does it translate to bash?

I'm converting a tcsh script to bash, hit a snag because I'm not entirely sure what >>& does

wget --output-document=/dev/null "http://somewebsite.org" >>& /root/wget.log

I did read the man-page http://linux.die.net/man/1/tcsh but not sure what "route the diagnostic" means, probably stderr...

so, just to be absolutely sure, is it the same as doing:

wget --output-document=/dev/null "http://somewebsite.org" 2>>&1 /root/wget.log

in a bash script?

Upvotes: 3

Views: 284

Answers (1)

that other guy
that other guy

Reputation: 123460

It appends both stdout and stderr to the file, so it's equivalent to:

wget --output-document=/dev/null "http://somewebsite.org" >> /root/wget.log 2>&1

Upvotes: 7

Related Questions