Find all files with the extension ".txt" in the current directory and its subdirectories, and replace the word "replace" with the name of each file in the command.
find . -iname "*.txt" -exec sed -i 's/replace/{}/g' \;