Re: Scripting: processing stanzas

From: Green, Simon (Simon.Green@EU.ALTRIA.COM)
Date: Wed Mar 19 2003 - 12:13:12 EST


If I have a file containing stanzas,
e.g.
SystemX:
        parm1=aaa
        parm2=bbb
        parm3=ccc
        ...

Is there a convenient way of converting this into shell variables?
Input file could have a variable number of stanzas, each with a variable
number of parameters.

I'm sure I can sort something out, but I don't want to re-invent the wheel.

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.

> -----Original Message-----
> From: Holger.VanKoll@SWISSCOM.COM [mailto:Holger.VanKoll@SWISSCOM.COM]
> Sent: 19 March 2003 16:50
> To: aix-l@Princeton.EDU
> Subject: AW: Scripting: processing stanzas
>
>
> Hello Simon,
>
> I dont understand what you want to do.
>
> Could you give an example?
>
> Regards, Holger
>
>
> -----Ursprüngliche Nachricht-----
> Von: Green, Simon [mailto:Simon.Green@EU.ALTRIA.COM]
> Gesendet: Mi 19.03.2003 16:20
> An: aix-l@Princeton.EDU
> Cc:
> Betreff: Scripting: processing stanzas
>
>
>
> Is there any utility analogous to getopt that can be
> used to process input
> data in stanza format? Has to be useable with a Korn
> shell script, as I
> don't speak Perl or anything clever like that.
>
> If not, any convenient tricks? I'm writing something
> from scratch, so I
> have complete control over the data format but
> stanzas would be simple to
> maintain.
>
> 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:40 EDT