Here's a fast method:
Code:
alias wordsinfile {
  tokenize 62 $shortfn($1)
  bread -c $1 0 $file($1) &a
  breplace &a 32 10
  bwrite $1.temp 0 -1 &a
  filter -ffx $1.temp nul $crlf
  .remove $1.temp
  $iif($isid,return,echo -at) $filtered
}
What this does is turn spaces into newlines and store the result in a temporary file. The lines of that file are then counted, excluding blank ones.

Edit: hixxy posted in the meantime, but it's always good to have options

Last edited by qwerty; 13/03/07 07:32 PM.