Find all files (not including those ending in .sh) and execute a sed command to delete any lines containing the pattern, for each of the found files.
find . -not -name '*.sh' -exec sed -i '' -e '/pattern/d' {} +