|
count the number of files which have a search string, but counting the file only once
I need to count the number of files which have a search string, but counting the file only once
if search string is found.
eg: File1: Please note that there are 2 occurances of "aaa"
aaa
bbb
ccc
aaa
File2: Please note that there are 3 occurances of "aaa"
aaa
bbb
ccc
aaa
aaa
File3:
bbb
ccc
But need the count of files which has the occurance of "aaa". In the above example, it should
give me 2 --> (File1 and File2).
It should not give me 5 since "aaa" occured 2 times in File1 and occured 3 times in File2.
|