Find all files with the extension ".sh" in the current directory and its subdirectories, and then delete all lines containing the word "rand" in them.
find . -maxdepth 2 -name "*.sh" | xargs sed -i -e "/rand/d"