Reputation: 425
How do I parse the output of script/utils-linux into human-readable form or into something I can process with regexps? There are some binary escape sequences used to display colours etc.
Is there a unix tool to record the text console (e.g. gnu screen)
in a human-readable form with milliseconds timings ?
ttyrec/ttyplay uses a rather unreadable format I was not able to find proper documentation for; the screen function logstamp creates a somewhat more readable log but is unable to give precise timings, only up to a second.
Upvotes: 0
Views: 652
Reputation: 1048
you can easily parese ttyrec with something like that: https://github.com/antono/shelr/blob/master/lib/shelr/ttyrec.rb
If you want to just share your terminal there is http://shelr.tv/ with corresponding utility: https://github.com/antono/shelr
If you want strip escape sequences you can do it with following command:
sed -r "s/\x1B[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
Upvotes: 1