More often that I like to admit I look for a file that contains some strings.
Currently I do:
grep -rl string1 | xargs grep -l string2 | xargs grep -l string3
Is there a tool that does this prettier?
This grep
s for string1
or string2
or string3
.
grep -rl -e string1 -e string2 -e string3
I want files that contain string1
and string2
and string3
but not necessarily on the same line.
Maybe one of the modern grep
s (ag/ack/rg/sift
) can do this?