script and scriptreplay
The following command start script record
$ script -t 2> timing.log -a output.session
Then type the command u want to record like
$ ls
...
...
...
$ exit
Input exit command to stop record.
Type the command below to replay the script.
$ scriptreplay timing.log output.session
Real Time Command Display
- First open two terminal
- In terminal-1
- Input the follow command
- The upon command will create a file named scriptfifo in current fold
$ mkfifo scriptfifo # make a pipe
- In terminal-2
$ cat scriptfifo
- In terminal-1
$ script -f scriptfifo
- Then when u input command in terminal-1 the terminal-2 will redo the same command automatic.
After the test use unlink scriptfifo
to close the pipe.