I am using
find $dir -type d|grep -i $word
to retrieve a list of directories, case-insesnsitive, that contain word "TEST" in it's path.
Now I'd like to modify it to only retrieve those directories that contain files of type .txt
how can i accomplish that?