I wrote this script a few months ago, and now re-reading it, I can not decrypt what I meant by this line:
sudo rsync -xPRSaz --rsync-path='sudo rsync' maeve@macbook :/ macbook/ 3>&1 1>&2 2>&3 | tee macbook.log
I cannot find any special file descriptor 3 handling for sudo , rsync or tee . After the redirect, which I am guessing right now, this is the situation:
now fd points to old fd 0 --> 0 1 --> 2 2 --> 1 3 --> 1
- Do these redirects apply to
sudo or rsync and to which end? - Is file descriptor 3 open or dangling in any "bad" way?
source share