wc - display a count of lines, words and characters in a file
wc [-c | -m | -C] [-lw] [file]...
wc [-c | -m | -C] [-lLqw] [file]...
wc reads one or more input files and, by default, writes the number of NEWLINE characters, words and bytes contained in each input file to the standard output.
wc also writes a total count for all named files, if more than one input file is specified.
wc considers a word to be a non-zero-length string of characters delimited by white space (for example, SPACE, TAB). See iswspace(3C) or isspace(3C).
The wc built-in in ksh93 is associated with the /bin and /usr/bin paths. It is invoked when wc is executed without a pathname prefix and the pathname search finds a /bin/wc or /usr/bin/wc executable.
wc reads one or more input files and, by default, for each file writes a line containing the number of NEWLINEs, words, and bytes contained in each file followed by the file name to standard output in that order. A word is defined to be a non-zero length string delimited by isspace(3C) characters.
If more than one file is specified, wc writes a total count for all of the named files with total written instead of the file name.
By default, wc writes all three counts. Options can specified so that only certain counts are written. The -c, -C, and -m options are mutually exclusive.
If no file is specified, or if the file is -, wc reads from standard input and no filename is written to standard output. The start of the file is defined as the current offset.
-c
--bytes | chars
-l
--lines
-L
--longest-line | max-line-length
-m | C
--multibyte-chars
-q
--quiet
-w
--words
The following options are supported:
-c
-C
-l
-m
-w
If no option is specified, the default is -lwc (counts lines, words, and bytes.)
The following operand is supported:
file
See largefile(5) for the description of the behavior of wc when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
See environ(5) for descriptions of the following environment variables that affect the execution of wc: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH.
0
>0
See attributes(5) for descriptions of the following attributes:
|
|
The ksh93 built-in binding to /bin and /usr/bin is Volatile. The built-in interfaces are Uncommitted.
cksum(1), ksh93(1), isspace(3C), iswalpha(3C), iswspace(3C), setlocale(3C), attributes(5), environ(5), largefile(5), standards(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |