Find all files with the name ending in ".txt" in the current directory and its subdirectories, and append "bar" to the end of each line in each file.
find ./ -maxdepth 2 -iname '*.txt' -exec sed -i -e 's/$/ bar/' {} +