###用法
$ script -h
Usage:
script [options] [file]
Options:
-a, --append append the output
-c, --command run command rather than interactive shell
-r, --return return exit code of the child process
-f, --flush run flush after each write
–force use output file even when it is a link
-q, --quiet be quiet
-t, --timing[=] output timing data to stderr (or to FILE)
-V, --version output version information and exit
-h, --help display this help and exit
-a 选项 ,在现有输出录制的文件的内容上追加新的内容
-c选项 ,后面可以加上需要执行的命令,而不是交互式shell上执行的命令
-r选项 , 子进程中返回退出代码
-f选项 , 如果需要在输出到日志文件的同时,也可以查看日志文件的内容,可以使用 -f 参数。PS:可以用于教学,两个命令行接-f可以实时演示
-q选项 ,可以使script命令以静默模