濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > linux shell腳本學(xué)習(xí)錄制與回放終端會(huì)話

linux shell腳本學(xué)習(xí)錄制與回放終端會(huì)話

熱門(mén)標(biāo)簽:地圖標(biāo)注員都是年輕人 如果做線上地圖標(biāo)注 江蘇云電銷(xiāo)機(jī)器人公司 河南信譽(yù)好的不封卡電話外呼系統(tǒng) 百度地圖標(biāo)注錯(cuò)了有責(zé)任嗎 揭陽(yáng)智能電話機(jī)器人推薦 華鋒e路航港口地圖標(biāo)注 客服外呼系統(tǒng)怎么樣 打電話機(jī)器人接我是他的秘書(shū)

復(fù)制代碼 代碼如下:

amosli@amosli-pc:~/learn$ script -t 2> timing.log -a output.session#開(kāi)始錄制
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
2013年 12月 20日 星期五 01:06:41 CST
amosli@amosli-pc:~/learn$ exit
exit #結(jié)束錄制
Script done, file is output.session



播放錄制:

復(fù)制代碼 代碼如下:

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
2013年 12月 20日 星期五 01:06:41 CST
amosli@amosli-pc:~/learn$ exit
amosli@amosli-pc:~/learn$

進(jìn)行多個(gè)用戶(hù)之間進(jìn)行廣播視頻會(huì)話:打開(kāi)兩個(gè)終端

(1)在終端1中輸入以下命令:

復(fù)制代碼 代碼如下:

mkfifo scriptfifo

(2)在終端2中輸入以下命令:

復(fù)制代碼 代碼如下:

cat scriptfifo

(3)返回終端1,輸入以下命令:

復(fù)制代碼 代碼如下:

script -f scriptfifo
commands...

這樣就實(shí)現(xiàn)了廣播,在線課堂類(lèi)的作用,非常神奇?。?/P>

我自己實(shí)驗(yàn)的輸出:

復(fù)制代碼 代碼如下:

終端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:~$

終端2:
amosli@amosli-pc:~$ cat scriptfifo
Script started on 2013年12月20日 星期五 01時(shí)21分19秒
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:~$

您可能感興趣的文章:
  • Linux Shell腳本系列教程(二):終端打印命令詳解
  • Linux下使用Shell腳本獲取終端寬度的解決方法

標(biāo)簽:赤峰 婁底 馬鞍山 巴彥淖爾 金昌 邵陽(yáng) 許昌 淘寶邀評(píng)

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《linux shell腳本學(xué)習(xí)錄制與回放終端會(huì)話》,本文關(guān)鍵詞  linux,shell,腳本,學(xué)習(xí),錄制,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《linux shell腳本學(xué)習(xí)錄制與回放終端會(huì)話》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于linux shell腳本學(xué)習(xí)錄制與回放終端會(huì)話的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    古交市| 甘肃省| 思茅市| 康乐县| 铁岭县| 乐昌市| 类乌齐县| 阳西县| 义乌市| 介休市| 原平市| 广元市| 栾城县| 米泉市| 泰和县| 双柏县| 双城市| 尉犁县| 襄樊市| 鹤壁市| 岳阳县| 札达县| 沁源县| 芮城县| 宁阳县| 宜丰县| 修文县| 石门县| 乐昌市| 通许县| 饶平县| 铜梁县| 南京市| 金秀| 双流县| 罗源县| 营山县| 莎车县| 阳朔县| 巴林右旗| 红河县|