Quantcast
Channel: Count findings of string in folders - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

Count findings of string in folders

0
0

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 all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images