Search the directory and its subdirectories up to 5 levels deep, starting from the second level, for files with the extension ".sh" and execute the command "grep "sed" on each of them.
find /directory -maxdepth 5 -mindepth 2 -name '*.sh' -exec grep "sed" {} \;