in reply to Add line numbers to HTML

What about:

$ nl file.old.html > file.new.html
--
b10m

All code is usually tested, but rarely trusted.