Find all files with the extension ".sh" in the entire file system, print the path of each file, shuffle the list, take the first item in the list, and search for the string "searchstring" in that file.
find / -name '*.sh' -printf '%p\n' | shuf | head -n1 | xargs grep searchstring