Re: Scripting: processing stanzas - chosen solution

From: Green, Simon (Simon.Green@EU.ALTRIA.COM)
Date: Mon Mar 24 2003 - 07:50:59 EST


Thanks to everybody for their help with this. I haven't quite finished yet
but I have the skeleton of something that'll work and thought it might
interest people. I've got some tidying up to do, and perhaps some code for
validating the input, but it's useable now.

Most of you will probably recognise the data as SP2 node information: I'm
building commands to populate the SDR during DR. (I've seen loads of
scripts to do this sort of thing, but none of them quite met my needs.)

There are two scripts to process the data. The first one uses awk to
consolidate the data, and passes it one line at a time to the second script,
which builds a third script with the various SP commands to enter the
information into the SDR. I've used eval to process each line of data in
the stanza, which seems to work quite nicely.

Thanks again,
Simon Green
Altria ITSC Europe s.a.r.l.

AIX-L Archive at http://marc.theaimsgroup.com/?l=aix-l&r=1&w=2
AIX FAQ at http://www.faqs.org/faqs/aix-faq/

N.B. Unsolicited email from vendors will seldom be appreciated.








This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:41 EDT