I would like to log actions made in a terminal window, and convert the log to html on fly.
I already tried commands script/screen + ansi2html, but the result is not perfect: the escape sequences for line editing is not handled correctly, so in the resulting html I have a mixture for the old and the new version of the line. So if the output of the terminal is like
$> echo Original text
Original text
$> echo Other
Other
The resulting html is
$> echo Original text Original text $> echo Othernal text Other
Any idea, how to solve the issue?
perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g'
), on a script log, where I have rewritten the line "echo Original text" to "echo Other". In the output, I saw "echo Othernal text" – Attila Szlovencsák Sep 22 '13 at 20:11