I wish I could make
script work like this:
❯ script --user=call.log --prog=response.log Script started ❯ echo foo foo ❯ exit Script done ❯ cat call.log echo foo ❯ cat response.log foo
Since it doesn't, I'm looking for alternatives.
Viewing the actual output of
script shows something like this:
^M^[[35m❯ ^[[Ke^Hecho foo#[[?1l^[>^?2004l^M^M ^0;tmp: echo foo^Gfoo^M
I've considered writing a parser to pull what I want out of there--but that seems fragile, especially because it appears to depend on the user's shell configuration.
Is there a better way to log the ins and outs of a session separately?