Se você tivesse tempo e lesse o manual grep
, teria encontrado a opção l
-l, --files-with-matches
Suppress normal output; instead print the name of each input file from which output would normally
have been printed. The scanning will stop on the first match.
Seu comando find
seria parecido com
find . -name "*.tex" -exec grep -il "agent" {} \; | less
ou mais rápido
find . -name "*.tex" -exec grep -il "agent" {} + | less