WinUtils - wc |
NAME
wc - display a count of lines, words, and characters in a file
SYNOPSIS
wc [-clwR] file...
DESCRIPTION
c reads one or more input files and writes the number of lines, words, and characters in each file to the standard output. If more than one file is supplied, then a total count for all the files is also written. If no options are supplied, then wc defaults to all (-clw).
wc considers a word to be a string of characters delimited by white space (space, tab, newline, etc.).
OPERANDS
-c | Count characters. |
-l | Count lines. |
-w | Count words. |
-R | Recurse into sub-directories. |
file... | A list of file names, or file specifications. |
EXAMPLES
wc text.txt
will print the count of characters, lines, words in the file text.txt.
wc -l -c *.cpp *.h
will print the count of characters, and lines in all files with an extension .cpp or .h.