capture bash sessions
script: Command for script recording.scriptreplay: Commandfor script replay.typescript: Default script output file.timingfile: Default timing output file.Note: we need both a timingfile and typescript file, as when we replay we need to know how long did every stroke take
# Start recording
script 
# Keep on scripting
ls
ls -l
echo "test"
# Finish recording
exit
# Replay
scriptreplay
Previous scenario would result in having typescript and timingfile in the working directory, once we start scriptreplaying, contents of both files will be replayed.
# Start recording
script -tCustomTimingFile CustomTypeScript
# Keep on scripting then Finish
exit
# Replay
scriptreplay -t CustomTimingFile CustomTypeScript -d 4
Now we use CustomTimingFile instead of timingfile
And we use CustomTypescript instead of typescript
# Start recording
script -tCustomTimingFile CustomTypeScriptFile
# Keep on scripting then Finish
exit
# Replay
scriptreplay -t CustomTimingFile CustomTypeScriptFile -d 4
Now we divide the speed with -d 4 to be four times the speed.