Find all files with the extension ".tmp" in the current directory and its subdirectories, and execute the command "grep -l 'string pattern'" on each of them.
find ~ -name "*.tmp" -exec grep -l 'string pattern' {} \;