Find all files with the extension ".sh" in the current directory and its subdirectories, and then use xargs to run the sed command to delete all blank lines in those files.
find ~ -name "*.sh" | xargs sed -i '/^$/d'