Find all files with the extension ".sh" in the current directory and its subdirectories, then for each file, replace the first line with a comment (#) but not the other lines.
find ~ -type f -name '*.sh' | xargs -n 1 sed -i '1!b;s/^/#/'