Record a Terminal Session
Record a terminal command, then press 'Control + d' to exit.
1script --timing=time.log stat.txt
2ls -a
3ls -al
4stat ~/.bashrc
5^D
Replay the session:
1scriptreplay --timing=time.log stat.txt
Try a bare command, without any timing:
1script -c 'top | lolcat' loltop
2nl loltop
Has your terminal messed up? Is the cursor hiding? Reset it!
1reset
If you can't see any keys, keep typing anyway: have faith in your terminal.
This loltop file will not play properly as it has no timings file.
But you can cheat the system and use your other timings file:
1scriptreplay --timing=time.log loltop
This will mostly not work well, but it shows how the timing file works:
10.033401 23
20.044513 8
30.000016 219
41.349324 114
50.179106 1
60.088790 1
70.072821 1
80.358337 2
90.000254 9
100.004720 52
110.000084 21
120.155462 671
I think it works like this?
| How long it took | to type n characters |
|---|---|
| 0.033401 | 23 |
| 0.044513 | 8 |
| 0.000016 | 219 |
| 1.349324 | 114 |