From: RocketMan on
K, it took a while but I finally found one part of my solution. To
get this to work
rsync -avx -e ssh ./filename
DestinationHostUserName(a)DestinationHost:directory

HOWEVER, I do need to know, if its possible, how to get rsync to use
the DestinationHosts definition for an enviorment value called $DATA
which in my case is the directory to put the file into which MAY
change from machine to machine.

HELP PLEASE.

THANKS

From: Bill Marcum on
On 2007-10-22, RocketMan <ImaChessNut(a)gmail.com> wrote:
> K, it took a while but I finally found one part of my solution. To
> get this to work
> rsync -avx -e ssh ./filename
> DestinationHostUserName(a)DestinationHost:directory
>
> HOWEVER, I do need to know, if its possible, how to get rsync to use
> the DestinationHosts definition for an enviorment value called $DATA
> which in my case is the directory to put the file into which MAY
> change from machine to machine.
>
> HELP PLEASE.
>
> THANKS
>
DATA=$(ssh DestinationHostUserName(a)DestinationHost ". ~/.bashrc; echo $DATA")
Replace ~/.bashrc with the name of the script that sets DATA.
Or perhaps
ssh DestinationHostUserName(a)DestinationHost 'rsync -avh -e ssh \
SourceHostUserName(a)SourceHost:/path/filename $DATA'