2008/12/5 Peter Chubb <[EMAIL PROTECTED]>:
> I'd be very tempted to use a function and avoid the quoting wars.
>
> function myrsync()
> {
>        /usr/bin/rsync -e 'ssh -i /root/rsync.id' ... "$@"
> }

Yes I though about that but all this started when the "ssh -e..." part
was in its own variable (for easier configurability), so I'm not sure
how much a function call would have helped.

>
> Otherwise, try playing with bakcslasheds to quote the
>
> rsync="/usr/bin/rsync ... -e 'ssh -i /root/rsync.id'"
> localargs=....
>
> eval $rsync $local

Eval was the answer. Just adding "eval" in front of the rsync, without
any change, started to get things working.

Thanks,

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to