nv-l
[Top] [All Lists]

Re: Parsing $NVATTR_x

To: nv-l@lists.tivoli.com
Subject: Re: Parsing $NVATTR_x
From: James Shanks <James_Shanks@TIVOLI.COM>
Date: Fri, 17 Sep 1999 11:00:12 -0400
Well, I don't know what is so ugly about your solution, Duane.   Looks like a
common UNIX script method to me.

As for Leslie's question, Event Attributes, and Reset and Pass-On-Match, allow a
syntax of "x.y" where y is the yth word of variable x (e.g., "3.2" means the
second word of the third variable, for example) but that is about all.  It is
not a universal feature of all ruleset nodes and it is not available in the
Action function -- you have to parse variables yourself there -- so something
like what Duane suggests would still be necessary in your script.

The external TEC adapter tecad_nv6k (and others) do permit a substring function
in the CDS I believe, but this is not available in the internal nvserverd
adapter, though the "printf" function, which allows you to combine variables, is
common to both.

James Shanks
Tivoli (NetView for UNIX) L3 Support



"Waddle, Duane" <DWaddle@COMDATA.COM> on 09/17/99 09:41:13 AM

Please respond to Discussion of IBM NetView and POLYCENTER Manager on NetView
      <NV-L@UCSBVM.UCSB.EDU>

To:   NV-L@UCSBVM.UCSB.EDU
cc:    (bcc: James Shanks/Tivoli Systems)
Subject:  Re: Parsing $NVATTR_x




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.

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


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

Archive operated by Skills 1st Ltd

See also: The NetView Web