shell - How do you get a count of the occurrence of a word in each of a large set of files in Unix? -
i trying frequency of particular word in several files. wrote in unix shell:
find . -name "*.out" | xargs grep -i "search_string" | wc -l
the problem giving me sum of frequencies of document. want individual counts each file. best way shell?
find . -name '*. out' -exec grep -ci "search_string" {} +
Comments
Post a Comment