UNSOLVED

savuka1

updated

17 years ago

S

savuka1

20 Posts

0

1312

June 4th, 2009 05:00

ASL filter question

Hi,

I am pulling out the Description via ASL and want to only print data using comma's as the FS.

How do a go about doing this, I have tried substring but it is not working as expects, I am looking for an awk type print statement

example:

awk -F"," {print $1" "$2}'

ASL code I am using:

START {
}
do {
// get list of all nodes
//
nodes = getInstances("ICIM_UnitaryComputerSystem");
//
// go through list of nodes
//
foreach node ( nodes ) {
or = object(node);
de = or->DiscoveryErrorInfo?IGNORE;
model = or->Model?IGNORE;
desc = or->Description?IGNORE;
newdesc = substring(desc,33,43);
if ( glob( 'SWFE-E-ELOOP-Agent*', de) ) {
print(node." ".model." ".newdesc);
}
}
//
stop();
//
}


Kind Regards
J