[GRLUG] termcap-capable recording and controlled replay

Jeff DeFouw jeffd at i2k.com
Mon Dec 28 19:52:35 EST 2009

On Mon, Dec 28, 2009 at 05:54:55PM -0500, Michael Mol wrote:
> I can run something akin to this:
> $ mtr google.com > recording.txt
> (wait a few seconds)
> ^C
> $ cat recording.txt
> ...And if my terminal when executing the 'cat' is compatible with that
> of when I ran 'mtr', and have the same terminal geometry, then I'll
> see an insane-speed replay of the mtr run.
> What I'd *like* is the ability of recording such output that
> accomplishes three goals:
> 1) continue to operate in a terminal environment
> 2) time-aware playback features, such as seeking, rewind, fast forward, pause.
> 3) Awareness of TERMCAPS and conversion from the original recording's
> terminal commands to compatible commands for the TERMCAPS of the
> playback environment.
> Is anyone aware of anything that accomplishes all three of these?
> Avoidance of dependence on GUIs is important, as I frequently do
> things remotely, and console environments tend to be the most reliable
> and efficient for such purposes.  A tool that takes the place of the
> 'tee' command would be even better; I could still continue using the
> console interface while doing the recording. STDERR would be extremely
> tricky to capture in a pipelined environment, and not interesting
> enough for my needs to be worth the hassle; It'd require piping
> through a couple named pipes.

The standard "script" command does 1.  It can record timing information.  
It works by setting up a pty in the same manner as screen.  I don't know 
of any tool that does 2 or 3.

Jeff DeFouw <jeffd at i2k.com>

More information about the grlug mailing list