Im very new to tcl scripts, therefore please apologies this question, I was
not able to answer to myslef, even after googling for quite some time.

My script:

 set COPP [ exec {show policy-map control-plane} ]
 foreach map [ regexp -inline {Class-map:[^\n]+\s } $COPP ] {
  }

if [ regexp -all {conformed (\d+) packets} $COPP map0] {
  puts -nonewline "$map $map0"
 }




Gives output:
Class-map: SNMP (match-all)
  conformed 38118 packets


Required output:
Class-map: SNMP (match-all) conformed 38118 packets    --> on same line

I tried with option -nonewline or \n but somehow I did not get it right.

many thanks, keti
_______________________________________________
cisco-nsp mailing list  [email protected]
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/

Reply via email to