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

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -