Find all files with the extension ".txt" in the directory "/usr/local/bin" and its subdirectories, and replace the string "%s" with "whatever" in each of those files.
find /usr/local/bin -maxdepth 1 -type f -name "*.txt" -exec sed -i 's/%s/whatever/' {} \;