xref: /386bsd/usr/share/man/cat1/wc.0 (revision a2142627)
1WC(1)                       386BSD Reference Manual                      WC(1)
2
3NNAAMMEE
4     wwcc - Word, line, and byte count.
5
6SSYYNNOOPPSSIISS
7     wwcc [--ccllww] [_f_i_l_e ...]
8
9DDEESSCCRRIIPPTTIIOONN
10     The wwcc utility reads one or more input text files, and, by default,
11     writes the number of lines, words, and bytes contained in each input file
12     to the standard output.  If more than one input file is specified, a line
13     of cumulative count(s) for all named files is output on a separate line
14     following the last file count.  WWcc considers a word to be a maximal
15     string of characters delimited by white space.
16
17     The following options are available:
18
19     --cc      The number of bytes in each input file is written to the standard
20             output.
21
22     --ll      The number of lines in each input file is written to the standard
23             output.
24
25     --ww      The number of words in each input file is written to the standard
26             output.
27
28     When an option is specified, wwcc only reports the information requested by
29     that option. The default action is equivalent to all the flags --ccllww
30     having been specified.
31
32     The following operands are available:
33
34     _f_i_l_e    A pathname of an input file.
35
36     If no file names are specified, the standard input is used and a file
37     name is not output. The resulting output is one line of the requested
38     count(s) with the cumulative sum of all files read in via standard input.
39
40     By default, the standard output contains a line for each input file of
41     the form:
42
43           lines    words  bytes   file_name
44
45     The counts for lines, words and bytes are integers separated by spaces.
46     The ordering of the display of the number of lines, words, and/or bytes
47     is the order in which the options were specified.
48
49     The wwcc utility exits 0 on success, and >0 if an error occurs.
50
51SSTTAANNDDAARRDDSS
52     The wwcc function conforms to IEEE Std1003.2 (``POSIX'').
53
54BSD Experimental                 June 27, 1991                               1
55
56
57
58
59
60
61
62
63
64
65
66
67