Command wc

This command is part of the posix extensions and needs to be imported to be available to the shell.
See Posix Commands


wc prints line, word, and character counts


wc [options] [file ...]


Prints line, word and character counts from one or more files.
If no options are given then the default is -l -w -c.
If no files are given, or if "-" is given then counts are read from the standard input.

One line is printed with each of the selected counts followed by the filename (if not the standard input).
A total line is printed if > 1 file is selected.


wc takes the following options.

-lCount lines
-wCount words
-cCount characters (not bytes)

Return Value

Returns 0 if the command executed successfully, 1 if there was an error.

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki