|WC(1)||General Commands Manual||WC(1)|
wcutility reads one or more input text files and, by default, writes the number of lines, words, and bytes contained in each input file to the standard output. If more than one input file is specified, a line of cumulative count(s) for all named files is output on a separate line following the last file count.
wcconsiders a word to be a maximal string of characters delimited by whitespace. Whitespace characters are the set of characters for which the isspace(3) function returns true. The options are as follows:
wconly reports the information requested by that option. The default action is equivalent to the flags
-clwhaving been specified. If no file names are specified, the standard input is used and a file name is not output. The resulting output is one line of the requested count(s) with the cumulative sum of all files read in via standard input. By default, the standard output contains a line for each input file of the form:
lines words bytes file_name
-mhas the same effect as
wcutility exits 0 on success, and >0 if an error occurs. isspace(3)
wcutility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification. The flag [
wcutility appeared in Version 1 AT&T UNIX.
|October 24, 2016||OpenBSD-current|