Let's suppose I want to find all .txt
files and search for some string. I would do:
find ./ -type f -name "*.txt" -exec egrep -iH 'something' '{}' \;
What if I want to do a more complex filtering, like this:
egrep something file.txt | egrep somethingelse | egrep other
Inside find -exec? (or similar)
Please keep in mind that I'm searching for a solution that I could easily type when I need it. I know that this could be done with a few lines using a shell script, but that isn't what I'm looking for.