2

vim, less, more, top all hate files produced by the script command. script doesn't produce a text file. It produces a binary file full of terminal control info based on everything that happened in the terminal.

OK fine but I need to control replay better than scriptreplay seems to offer with a timing file. I want to move forward and back through it interactively. So I can stop it and read things.

A popular approach seems to be to convert the binary file to a text file. Theoretically possible but never seems to match. I've tried solutions using col, perl, sed, and awk. Perl came closest but still doesn't match.

I'm willing to lose color information but I want text to show up where it's supposed to show up.

Is there a better solution then just increasing the scrollback limit until cat works?

  • see https://superuser.com/q/236930 – Bodo Jan 27 '22 at 19:48
  • @Bodo Tried that already. If we're talking about trying to convert the binary file to plain text I got better results from a method @dewtell gave us. I was hoping to do better. It's really hard to simulate what the terminal would show without the terminal. – candied_orange Jan 27 '22 at 19:52
  • Did you try col as mentioned in the answers. Then, please, [edit] your question and write exactly what you tried and what's wrong with this solution. Examples might also help. This avoids that we propose solutions you already know. Make your requirements as clear as possible. – Bodo Jan 27 '22 at 20:04
  • @bodo better now? – candied_orange Jan 27 '22 at 20:28
  • For that sort of thing, I use a script (vile-pager) which renders colors and same-line cursor movement in vi like emacs. Presumably your favorite text-editor can do something similar. – Thomas Dickey Jan 27 '22 at 21:32
  • @ThomasDickey where would I find this? – candied_orange Jan 27 '22 at 21:46
  • I believe vile is packaged in EPEL; the script may not be part of the package, but is in the source. Current version is 9.8v (I recall some bug-fix for typescript files around 9.8t -- see source). – Thomas Dickey Jan 27 '22 at 23:22

0 Answers0