This command searches the directories in the current directory and copies the text files into the TEXT directory.
for i in ./* ; do cp "${i}"/*.txt ./TEXT ; done
This command searches the directories in the current directory and copies the text files into the TEXT directory.
for i in ./* ; do cp "${i}"/*.txt ./TEXT ; done