nv-l
[Top] [All Lists]

Re: Parsing $NVATTR_x

To: nv-l@lists.tivoli.com
Subject: Re: Parsing $NVATTR_x
From: Ray Schafer <schafer@tkg.com>
Date: Fri, 24 Sep 1999 00:08:00 -0400
"Waddle, Duane" wrote:

> I *think* you could do something similar to this ugly hack:
>
> echo $NVATTR_1 | awk '{print $1,$2,$3}'
>
> I've done this with other multi-word environment variables, but not
> explictly with NVATTR.
>

That would work.  The Korn Shell  has something you could take advantage of
as well (no outside commands need to be forked off)

set -A ATTR $NVATTR_1
This creates an array called ATTR.  The number of elements in the array is
listed by:
print ${#ATTR[*]}
the first word is listed by:
print ${ATTR[0]}
the second by:
print ${ATTR[1]}
etc.


>
> --D
>
> > -----Original Message-----
> > From: Leslie Clark [SMTP:lclark@US.IBM.COM]
> > Sent: Friday, September 17, 1999 12:54 AM
> > To:   NV-L@UCSBVM.ucsb.edu
> > Subject:      Parsing $NVATTR_x
> >
> > I could have sworn we used to be able to pick off a word from a
> > multi-word variable in a ruleset with some sort of subscripting, but I
> > can't
> > find
> > anything about it. Maybe I'm thinking of the formatting for the t/ec
> > classes.
> > Anyway, does anybody know what I am talking about and whether/how
> > to do it?
> >
> > Cordially,
> >
> > Leslie A. Clark
> > IBM Global Services - Systems Mgmt & Networking

--
Ray Schafer                   | schafer@tkg.com
The Kernel Group              | Distributed Systems Management
http://www.tkg.com


<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web