Will Dyson on Sat, 30 Nov 2002 06:20:13 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Variable interpolation in bash


sean finney wrote:
On Wed, Nov 27, 2002 at 06:02:49AM -0500, Will Dyson wrote:

This has been bugging me for a while now. When I am writting a bash script, I often want to do something of the form:

which seems perfectly reasonable...

could you send the script to the list?  are you sure that it's not the
program in question not parsing ares correctly or something else
being done to the variable at some point?

Here it is. Real simple.

----
#!/bin/bash

BACKUP_URL='scp://me@my.backup.box/' #sshd is listening on 2222

DUPLICTY_OPTS="-v2 --ssh-command 'ssh -p2222 -i/root/.ssh/id_rsa_nopass' --scp-command 'scp -P2222 -i/root/.ssh/id_rsa_nopass'"

duplicity $DUPLICTY_OPTS --include /etc --include /var/lib --include /var/www --include /root --exclude '**' / $BACKUP_URL
----


--
Will Dyson
"Back off man, I'm a scientist!" -Dr. Peter Venkman

_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug