Команда wc

Short for word count, wc displays a count of lines, words, and characters in a file.

Синтаксис

wc [-c | -m | -C ] [-l] [-w] [ file ... ]

-cCount bytes.
-mCount characters.
-CSame as -m.
-lCount lines.
-wCount words delimited by white space characters or new line characters. Delimiting characters are Extended Unix Code (EUC) characters from any code set defined by iswspace()
fileName of file to word count.

Примеры

wc myfile.txt - Displays information about the file myfile.txt. Below is an example of the output.

5    13    57   myfile.txt

5 = Lines
13 = Words
57 = Characters

Обратно к списку команд