Find all files (not including directories) in the current directory and its subdirectories up to 4 levels deep, excluding files with the extension .sh, and execute the command 'grep -l 'foo' {} +' on them.
find ~ -mindepth 1 -maxdepth 4 -type f ! -name '*.sh' -exec grep -l 'foo' {} +