Find all files with the extension .txt, print their names, and search for any lines containing the words "test" or "testdata" in them.
find . -type f -name '*.txt' -print | xargs grep -E '.*(test|testdata?).*'