alias hacktoken { unset %hacktok.* set %hacktok.tot 1 var %x = 1 var %y = 2 while (%x <= $len($1-)) { var %l = $mid($1-,%x,%y) if ($asc(%l) == 32) { set $+($chr(37),hacktok.,%x) %l2 inc %hacktok.tot unset %l2 } else { var %l2 = %l2 $+ %l } inc %x inc %y } echo -a total words: %hacktok.tot }