Blob


1 .TH WC 1
2 .SH NAME
3 wc \- word count
4 .SH SYNOPSIS
5 .B wc
6 [
7 .B -lwrbc
8 ]
9 [
10 .I file ...
11 ]
12 .SH DESCRIPTION
13 .I Wc
14 counts lines, words, runes, syntactically-invalid
15 .SM UTF
16 codes and bytes in the named
17 .IR files ,
18 or in the standard input if no file is named.
19 A word is a maximal string of characters
20 delimited by spaces, tabs or newlines.
21 The count of runes includes invalid codes.
22 .PP
23 If the optional argument is present,
24 just the specified counts (lines, words, runes, broken
25 .SM UTF
26 codes or bytes)
27 are selected by the letters
28 .BR l ,
29 .BR w ,
30 .BR r ,
31 .BR b ,
32 or
33 .BR c .
34 Otherwise, lines, words and bytes
35 .RB ( -lwc )
36 are reported.
37 .SH SOURCE
38 .B \*9/src/cmd/wc.c
39 .SH BUGS
40 The Unicode Standard has many blank characters scattered through it,
41 but
42 .I wc
43 looks for only
44 .SM ASCII
45 space, tab and newline.
46 .PP
47 .I Wc
48 should have options to count suboptimal
49 .SM UTF
50 codes
51 and bytes that cannot occur in any
52 .SM UTF
53 code.