Find all *.html files under current directory and for each file replace the first occurrence of STRING and previous lines with the content of common_header file
find . -type f -name '*.html' -exec sed -i -e '1r common_header' -e '1,/STRING/d' {} \;