set sh "" set iface "" for {} {1<2} {} { set ln [gets -] if {[string equal $ln "."]} break set sh "$sh$ln
" if {[string first auth $ln] >= 0} {set auth [string range $ln 5 666]} if {[string first clnt $ln] >= 0} {set clnt [string range $ln 5 666]} if {[string first par.iface $ln] >= 0} {set iface [string range $ln 10 666]} } proc getline {} { global b global c global d global e global f proc getword {} { global b set b [string trim $b] set p [string first " " $b] if {$p < 0} { set p $b set b "" return $p } set c [string range $b 0 [expr $p - 1]] set b [string range $b $p [string length $b]] set b [string trim $b] return $c } set c [getword] set q [getword] set d [getword] set e [getword] set f [getword] } set b [exec "show interfaces traffic"] set b [split $b "\r"] set b [split $b "\n"] set c "" set d "" set e "" set f "" getline puts "interfaces" puts "" puts "" puts "" for {} {[string length $b] > 0} {} { getline puts "" } puts "
interfacetxrxdrop
$c$d$e$f
" puts ""