.hd tc "text counter (characters, words, lines, pages) " 02/22/82
tc [-{c | l | p | w | v}] [<pathname>]
.ds
'Tc' is a filter used to count various parameters of text,
specifically characters, words, lines, and pages.
.sp
If a pathname is specified, the text to be counted is read from
that file; otherwise, text is read from standard input 1.
All output from 'tc' is written to its first standard output.
If no options are specified, or the "v" option is specified,
the counts are labeled; otherwise only the counts themselves appear.
.sp
The options control the items counted:
"c" for characters, "w" for words, "l" for lines, "p" for pages.
The "v" option causes unconditional printing of labels on the output.
.es
report> tc
eval @[tc -w part1] + @[tc -w part 2]
lf -c | tc -l
.me
"Usage: tc ..." for argument specified without "-" flag
.br
"illegal option" for unrecognized option letter
.bu
The page length is fixed at 66 lines, which is incorrect for output
generated by 'print'.
In addition, the definition of word used for word counting
("a sequence of non-blank, non-tab, non-newline characters")
may be too simplistic.
