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

Re: Counting occurances of a word in a file.



On Fri, 2011-12-09 at 09:15 +0100, Jörg-Volker Peetz wrote:
> With a modern grep version it is even more simple:
> 
>   grep -c 'the' /path/to/file.txt

i just tested with grep 2.9 and -c and -o does not get along well :)

-c only is able to count lines within file and no the lines of output
(generated by -o)

greets!
aL


Reply to: