I have a bunch of log files. I need to find out how many times a string occurs in all files.
grep -c string *
returns
... f
This works for multiple occurrences per line:
grep -o string * | wc -l