archlinux script 2021-04-01 终端记录命令script命令使用 文章目录 1. 记录2. 重放3. 清理并查看typescript文件4. 参考资料 记录12script -T stime.txt -a filename.txt# -T 指定时间记录文件,不然无法重放,如果不指定默认是保存到当前目录下面的typescript文件, -a filename追加记录到文件 重放123scriptreplay -t stime.txt -s typescript# -t 指定包含timing file# -s 指定包含script's 记录的文件 清理并查看typescript文件1234#清理typescript文件里面的按键记录字符cat typescript | perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g' | col -b > typescript-processed#查看整理后的文件cat typescript-processed 参考资料 Script Command without Junk Character https://man7.org/linux/man-pages/man1/scriptreplay.1.html https://man7.org/linux/man-pages/man1/script.1.html https://www.commandlinefu.com/commands/view/2318/fix-a-typescript-file-created-by-the-script-program-to-remove-control-characters