Quantcast
Viewing latest article 2
Browse Latest Browse All 2

Count findings of string in folders

I have a folder with .tex files and want to find how many TODOs 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 TODOs?


Viewing latest article 2
Browse Latest Browse All 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>