<P> The program reads either standard input or a list of files and generates one or more of the following statistics: newline count, word count, and byte count . If a list of files is provided, both individual file and total statistics follow . </P> <P> Sample execution of wc: </P> <P> The first column is the count of newlines, meaning that the text file foo has 40 newlines while bar has 2294 newlines - resulting in a total of 2334 newlines . The second column indicates the number of words in each text file showing that there are 149 words in foo and 16638 words in bar--giving a total of 16787 words . The last column indicates the number of characters in each text file, meaning that the file foo has 947 characters while bar has 97724 characters--98671 characters all in all . </P> <P> Newer versions of wc can differentiate between byte and character count . This difference arises with Unicode which includes multi-byte characters . The desired behaviour is selected with the - c or - m switch . </P>

Which command is used to count just the number of characters in a file in unix