[wplug] escaping double quotes in enivronment variables

Bill Moran wmoran at potentialtech.com
Sat Nov 27 13:16:50 EST 2004


John Harrold <jmh17 at pitt.edu> wrote:
> Sometime in November Bill Moran assaulted the keyboard and produced:
> 
> | I'm not sure I understand what you're asking here.
> | 
> | The normal way to escape any character is to preceed it with a \.
> | It seems you already know that, however.  Can you better state the
> | question?
> 
> When I run the following:
> 
> $ rsync -av -e "ssh -2" user at host.com:~/test.txt .
> 
> It works. However when I run the following:
> 
> $ export RSYNC_OPTS='-av -e "ssh -2"'
> $ rsync ${RSYNC_OPTS}  user at host.com:~/test.txt .
> 
> It fails with the following error: 
> 
> rsync: -2": unknown option
> rsync error: syntax or usage error (code 1) at main.c(1084)
> 
> So I suppose I'm asking: "why does one work and the other fail?", or more
> to the point: "what do I need to do to make the latter work?" :).

Try
export RSYNC_OPTS="-av -e \"ssh -2\""

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com


More information about the wplug mailing list