Use this command to count the number of characters, words, and lines in a file. Suppose, for example, that we have a file dict with contents
red rojoThen we can do this
green verde
blue azul
white blanco
black negro
% wc dict
5 10 56 tmp
This shows that dict has 5 lines, 10 words, and 56 characters.
The word count command has several options, as illustrated below:
% wc -l dict
5 tmp
% wc -w dict
10 tmp
% wc -c dict
56 tmp
No comments:
Post a Comment