Find all files with the extension .txt in the current directory and its subdirectories, print the contents of each file to the terminal, and save the unique lines to a file.
find ~ -name '*.txt' -exec cat {} \; | tee <(uniq -c)