[wellylug] simple (bash) scripting question

Enkidu enkidu at cliffp.com
Sun Aug 1 11:05:42 NZST 2004


Erm, for a much more complicated but more elegant solution would be to
have one big "parameters" XML file, have a perl script to parse it
using eg XML::Simple, and have that kick off the rsyncs. That would
allow you to build in scheduling and all sorts of nice stuff. You
could even build a web front end to it. Cool!

Call it Syncro, give it a version number of 0.6, stick it on CPAN and
you are on your way to fame and fortune.....

Cheers,

Cliff

On Sat, 31 Jul 2004 17:17:11 +1200, you wrote:

>No I'm sorry Sam that's far to simple....
>
>If I'd thought of it - it would be fine (I was stuck in the "declare your
>variables mental loop")
>
>actually it should work perfectly - thanks for the quick response.
>
>-----Original Message-----
>From: wellylug-admin at lists.naos.co.nz
>[mailto:wellylug-admin at lists.naos.co.nz]On Behalf Of Sam Cannell
>Sent: Saturday, 31 July 2004 5:07 p.m.
>To: wellylug at lists.naos.co.nz
>Subject: Re: [wellylug] simple (bash) scripting question
>
>
>On Sat, 2004-07-31 at 17:04, Mark Signal wrote:
>
>> VARIABLE=`/path/cat common text file'
>>
>> rsync $VARIABLE source destination etc etc
>>
>> any ideas on how I could do this?
>
>If you're not wanting to do any kind of validation on the paramaters
>contained in the file, then something like this would suffice:
>
>rsync `cat /path/to/configfile` <source> <destination>
>
>Note that they're backticks (``) around the cat command, not apostrophes
>('')
>
>Hope this helps
>
>Sam
>--
>Sam Cannell <sam at plaz.net.nz>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.725 / Virus Database: 480 - Release Date: 19/07/2004




More information about the wellylug mailing list