September 2009
Beginner
942 pages
85h 34m
English
wc
wc [options] [files]
Print byte, word, and line counts for each file. Print a total line for multiple files. If files is omitted or is -, read standard input. See other examples under ls and sort.
Print byte count only.
Print line count only.
Print length of longest line.
Print character count only.
Print word count only.
Print help message and then exit.
Print the version number and then exit.
Count the number of users logged in:
who | wc -lCount the words in three essay files:
wc -w essay.[123]Count lines in the file named by variable $file (don’t display filename):
wc -l < $file