I have a folder with .tex
files and want to find how many TODO
s there are in all files. Currently, I'm doing this:
grep -r "TODO" chapters/*.tex | wc -l
This gives me each line that has (at least) one TODO
. How do I need to change it such that it does not count the lines but really the occurences, in order to cover the case that one line can contain multiple TODO
s?