"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
|