Hi, I've been doing shell programming for years but this got me stomped (simplified version):
rsync="/usr/bin/rsync -navHz --delete --delay-updates --bwlimit=256 -e 'ssh -i /root/rsync.id'" local=/mnt/data/html/minicpan copyto="test01:$local" $rsync $local/ $copyto/ When I execute this script with "sh -vx" the final lines are: $rsync $local/ $copyto/ + /usr/bin/rsync -navHz --delete --delay-updates --bwlimit=256 -e ''\''ssh' -i '/root/rsync.id'\''' /mnt/data/html/minicpan/ test01:/mnt/data/html/minicpan/ Missing trailing-' in remote-shell command. rsync error: syntax or usage error (code 1) at main.c(361) [sender=3.0.4] It looks like the shell splits the value of "$ssh" into words and adds quoting around them. The rsync command line I'd like to see is: /usr/bin/rsync -navHz --delete --delay-updates --bwlimit=256 -e ''ssh -i /root/rsync.id'' /mnt/data/html/minicpan/ test01:/mnt/data/html/minicpan/ But whatever I tried so far playing with single quotes or back-slashes I haven't managed to make the shell do that. What am I missing? Thanks, --Amos ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]