Is there tool or a regexp that can convert shell escape characters to HTML code?
As an example, here is a logfile from GNU screen:
^MESC[K$ ^MESC[K$ exit Executing .bashrc ESC[00;31;31mserver.xyz.com: ESC[00;34;34m~
which I would like to convert to something like this:
$ exit Executing .bashrc <font color=red>server.xyz.com</font>: <font color=blue>~</font>
and send as HTML e-mail to an e-mail address, to archive my work.
Here is a related question, which shows how to convert it to regular text, but it would be nice to convert to HTML and not just throw the escape characters away.