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

Answer by mikewhatever for Count findings of string in folders

$
0
0

Use the -o flag:

-o, --only-matching Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line.

For example grep -ro "TODO" chapters/*.tex | wc -l


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images