Find all files with the extension ".txt" in the current directory and its subdirectories, and execute the command "sed -i 's/\w\+/\U&/g' {} +" on each of them.
find ~ -name "*.txt" -exec sed -i 's/\w\+/\U&/g' {} +