Need to search a directories with lots of sub-directories for a string inside files:
I\'m using:
grep -c -r \"string here\" *
How can I
Using Bash's process substitution, this gives what I believe is the output you want? (Please clarify the question if it's not.)
grep -r "string here" * | tee >(wc -l)
This runs grep -r normally, with output going both to stdout and to a wc -l process.
grep -r
wc -l