[wplug] escaping double quotes in enivronment variables

Bill Moran wmoran at potentialtech.com
Sat Nov 27 15:42:44 EST 2004


John Harrold <jmh17 at pitt.edu> wrote:

> Sometime in November Bill Moran assaulted the keyboard and produced:
> 
> | After exporting the variable, if you just type "export" (to list exported
> | variables) ... what is the value of RSYNC_OPTS?
> 
> This is what it gives:
> 
> $ export |grep RSYNC
> declare -x RSYNC_OPTS="-av -e \"ssh -2\""

bash-2.05b$ export TEST='-e "option"'
bash-2.05b$ export | grep TEST
declare -x TEST="-e \"option\""
bash-2.05b$ echo rsync $TEST
rsync -e "option"
bash-2.05b$ echo "rsync $TEST"
rsync -e "option"

Hmmm ... Well, I can't say I've got any more advice for you.  I'm
not sure what's going wrong.  Hopefully someone else will have a
better answer.

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


More information about the wplug mailing list