Reputation: 341
Using the command below i could find the total occurrences of the given string in the current directory.
cat * | grep -c 'nike'
In the same way, how to get the total count of files in which the given keyword appears atleast once?
Thanks a bunch
Upvotes: 0
Views: 186
Reputation: 565
use grep with wc and -l option is for lines.
grep -R "pattern" .|wc -l
Upvotes: 0