What about:
$ nl file.old.html > file.new.html [download]
In reply to Re: Add line numbers to HTML by b10m in thread Add line numbers to HTML by Anonymous Monk