Find all files with the extension .txt in any directory two or three levels deep from the current directory, and execute the command 'sed -i 's/\s//g' {} \;' on each of them.
find . -mindepth 2 -maxdepth 3 -type f -name *.txt -exec sed -i 's/\s//g' {} \;