Replace all the mathes to regex '<script type="text\/javascript" charset="utf-8" src="file.js"><\/script>.*' with '<script type="text\/javascript" charset="utf-8" src="file2.js"><\/script>' in all HTML files under $DIR directory tree modifying the files in-place
find $DIR -type f -name '*.html' -exec sed -i 's/.*<script type="text\/javascript" charset="utf-8" src="file.js"><\/script>.*/<script type="text\/javascript" charset="utf-8" src="file2.js"><\/script>/g' {} \;