Find all files in the home directory with a ".sh" extension, and execute a sed command to replace any non-whitespace characters with the name of the file for each file.
find ~/ -iname "*.sh" -exec sed -Ei 's/[[:graph:]]+/{}/' {} \;