Unix command to count a given string and print with filename -


i have multiple files in folder. want read files count word present , print filename.

for example: numeric value matching count of string

filename string1 string2 file1      5       1 file2      3        7 

find . -name "abc" -exec grep -h 'xyz' {} +

reference link


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -