Current Path : /usr/src/contrib/nvi/tcl_scripts/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/src/contrib/nvi/tcl_scripts/wc.tcl |
# @(#)wc.tcl 8.2 (Berkeley) 11/18/95 # proc wc {} { global viScreenId global viStartLine global viStopLine set lines [viLastLine $viScreenId] set output "" set words 0 for {set i $viStartLine} {$i <= $viStopLine} {incr i} { set outLine [split [string trim [viGetLine $viScreenId $i]]] set words [expr $words + [llength $outLine]] } viMsg $viScreenId "$words words" }