The function of the WC command is to count the number of bytes, words, and lines in the specified file, and to display the output of the statistic results.
Syntax: WC [options] File ... Description: This command counts the number of bytes, words, and lines in a given file. If the file name is not given, it is read from the standard input. The WC also gives the president count of all specified files. The word is the largest string separated by the space character area. The command options have the following meanings: -C Count bytes. -L COUNT the number of rows. -W counts the number of words. These options can be used in combination. The order and number of output columns are not affected by the order and number of options. Always appear in the following order and at most one column per item. Number of rows, words, bytes, filenames If there is no file name in the command line, the file name does not appear in the output. For example: $ WC-LCW file1 file2 4 file1 7 File2 Total Omit any option the-LCW,WC command executes the same result as above Example: The WC command is used to calculate the number of rows, words, and characters in a file or multiple files specified. Such as: WC filename The first column shows the number of rows, the second column shows the number of words, and the third column shows the number of characters. WC has four parameters to choose from, namely L,c,m,w Wc-l FileName Report Line number Wc-c FileName Report bytes WC-M FileName Report Character count WC-W FileName report Number of words
|