Find all files with the name ending in ".txt" in the current directory and its subdirectories, and replace all occurrences of "blue" with "red" in those files.
find . -maxdepth 2 -iname '*.txt' -exec sed 's/blue/red/g' \{\} \;