JosefJezek
10/24/2013 - 7:53 AM

How to use Cisco TCL

How to use Cisco TCL

How to use Cisco TCL

Line Count

set cmd [lindex $argv 0]
if {[string equal $cmd ""]} { puts "Usage: wc command"; return; }
set result [ llength [split [exec $cmd] "\n" ] ]
puts -nonewline "OK | count=$result"

alias exec wc tclsh flash:wc.tcl

For Zenoss: https://gist.github.com/7526240

Resources