Команда wc
Short for word count, wc displays a count of lines, words, and characters in a file.
wc [-c | -m | -C ] [-l] [-w] [ file ... ]
| -c | Count bytes. |
| -m | Count characters. |
| -C | Same as -m. |
| -l | Count lines. |
| -w | Count 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() |
| file | Name 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