Copy Code code as follows:
amosli@amosli-pc:~/learn$ script-t 2> timing.log-a output.session# start recording
Script started, file is Output.session
amosli@amosli-pc:~/learn$ Hello1
No command ' hello1 ' found, did you mean:
Command ' Hello ' from package ' Hello-debhelper ' (main)
Command ' Hello ' from package ' hello ' (main)
Hello1:command not found
amosli@amosli-pc:~/learn$ who
Amosli Tty7 2013-12-19 22:58
Amosli pts/1 2013-12-19 22:59 (: 0.0)
Amosli pts/2 2013-12-19 23:16 (: 0.0)
amosli@amosli-pc:~/learn$ time
Real 0m0.000s
User 0m0.000s
SYS 0m0.000s
amosli@amosli-pc:~/learn$ Date
Friday, December 20, 2013 01:06:41 CST
amosli@amosli-pc:~/learn$ exit
Exit #结束录制
Script done, file is Output.session
Play recording:
Copy Code code as follows:
amosli@amosli-pc:~/learn$ scriptreplay timing.log output.session #按播放命令序列输出
amosli@amosli-pc:~/learn$ Hello1
No command ' hello1 ' found, did you mean:
Command ' Hello ' from package ' Hello-debhelper ' (main)
Command ' Hello ' from package ' hello ' (main)
Hello1:command not found
amosli@amosli-pc:~/learn$ who
Amosli Tty7 2013-12-19 22:58
Amosli pts/1 2013-12-19 22:59 (: 0.0)
Amosli pts/2 2013-12-19 23:16 (: 0.0)
amosli@amosli-pc:~/learn$ time
Real 0m0.000s
User 0m0.000s
SYS 0m0.000s
amosli@amosli-pc:~/learn$ Date
Friday, December 20, 2013 01:06:41 CST
amosli@amosli-pc:~/learn$ exit
amosli@amosli-pc:~/learn$
To broadcast video sessions between multiple users: open two terminals
(1) In Terminal 1, enter the following command:
Copy Code code as follows:
(2) in Terminal 2, enter the following command:
Copy Code code as follows:
(3) Return to Terminal 1 and enter the following command:
Copy Code code as follows:
Script-f Scriptfifo
Commands ...
This is the realization of the broadcast, online classroom class role, very magical!!
The output of my own experiment:
Copy Code code as follows:
Terminal 1:
amosli@amosli-pc:~$ Mkfifo Scriptfifo
amosli@amosli-pc:~$ script-f Scriptfifo
Script started, file is Scriptfifo
amosli@amosli-pc:~$ who
Amosli Tty7 2013-12-19 22:58
Amosli pts/1 2013-12-19 22:59 (: 0.0)
Amosli pts/2 2013-12-20 01:14 (: 0.0)
Amosli PTS/4 2013-12-20 01:16 (: 0.0)
Amosli PTS/5 2013-12-20 01:20 (: 0.0)
Amosli PTS/6 2013-12-20 01:20 (: 0.0)
amosli@amosli-pc:~$
Terminal 2:
amosli@amosli-pc:~$ Cat Scriptfifo
Script started on December 20, 2013 Friday 01:21 19 seconds
amosli@amosli-pc:~$ who
Amosli Tty7 2013-12-19 22:58
Amosli pts/1 2013-12-19 22:59 (: 0.0)
Amosli pts/2 2013-12-20 01:14 (: 0.0)
Amosli PTS/4 2013-12-20 01:16 (: 0.0)
Amosli PTS/5 2013-12-20 01:20 (: 0.0)
Amosli PTS/6 2013-12-20 01:20 (: 0.0)
amosli@amosli-pc:~$