I have a large directory with multiple levels and tons of files. A majority (but not all) of these files are HTML files, but do not have the
.html extension (a problem when copying over to Windows).
All of the HTML files have this as a first line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
How can I, by just using a command, add the
.html extension on to all files containing this string?
I have seen this SO question, but it does not rename based on whether the containings a string.