A bash script has the following line
rsync $OPTS $BACKDIR $USER@$DEST:$DESTDIR
but one of the options is rsh='ssh -p2222'
It complains :
rsync: -p2222': unknown option
rsync error: syntax or usage error (code 1) at main.c(1425) [client=3.0.7]
But when I change the script to :
echo rsync $OPTS $BACKDIR $USER@$DEST:$DESTDIR
and manually run the printed command it works.
Please advise