in reply to Re: Find file that contains "....." (command in Unix)
in thread Find file that contains "....." (command in Unix)

Well, here is yet another solution assuming gnu grep...

grep -F -r -I -l '.....' . | grep '.txt$'

...first part of the pipeline recursively, -r, (downword only) searches text files, -I, for ..... in the current directory, ., listing only the file names found. Second part filters the file names which lists only those ending in '.txt'.

Here is one more and bit more robust (to be run in "test" directory; see OP)...

find . -type f -name '*.txt' -print0 | xargs -0 grep -F -l '.....'