Wiki source for CommandWc

Show raw source

=====Command wc=====

This command is part of the [[CommandsPosix posix]] extensions and needs to be imported to be available to the shell.
See [[CommandsPosix 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.

||-l||Count lines||
||-w||Count words||
||-c||Count characters (not bytes)||

====Return Value====
Returns 0 if the command executed successfully, 1 if there was an error.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki