[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Counting occurances of a word in a file.

On Thu, 08 Dec 2011 07:53:33 -0800, peasthope wrote:

> What is a convenient tool for counting the occurances of a specific byte
> sequence in a file?  Count the occurances of "the" or  %13%10"the " in a
> text file for example.

Quick and dirty sample:

grep -o "the" /path/to/file.txt | wc -w



Reply to: