[wplug] escaping double quotes in enivronment variables

Brian Sammon wplug-list at brisammon.fastmail.fm
Sat Nov 27 17:23:44 EST 2004


> <script>
> #! /bin/sh
> export USER=user
> export HOST=host.com
> export RSYNC_OPTS='-av -e "ssh -2"'
> export RSYNC_BIN=/usr/bin/rsync
> ${RSYNC_BIN} ${RSYNC_OPTS} ${USER}@${HOST}:~/test.txt .
> </script>

A hack that I think would work is:
  #! /bin/sh
  USER=user
  HOST=host.com
  RSYNC_OPTS='-av -e'
  RSYNC_OPTS2='ssh -2'
  RSYNC_BIN=/usr/bin/rsync
  ${RSYNC_BIN} ${RSYNC_OPTS} "${RSYNC_OPTS2}" ${USER}@${HOST}:~/test.txt .

PS I removed the "export" because you don't need them to be environment 
variables,
just shell variables.




More information about the wplug mailing list