Find all files with the extension ".sh" in the current directory and its subdirectories, and then use xargs to run the sed command to remove all whitespace from the files.
find . -iname '*.sh' | xargs sed -i 's/[[:space:]]//g'