录制脚本
$ script -t 2>time.file -a output.file
#开始录制了
$ ls -al
1.c 2.c 3.c
#执行一个命令
$exit
#结束录制
回放脚本
$ scriptreplay time.file output.file
#脚本将会自动回放
$ script -t 2>time.file -a output.file
#开始录制了
$ ls -al
1.c 2.c 3.c
#执行一个命令
$exit
#结束录制
回放脚本
$ scriptreplay time.file output.file
#脚本将会自动回放