Find all files with the extension ".sh" in the root directory and replace the first line "#!/bin/bash" with "#!/bin/bash -x" in each file.
find / -type f -name "*.sh" -exec sed -i 's/#!/bin/bash/#!/bin/bash -x/g' "{}" \;