用expect简化操作

来源:互联网 发布:淘宝街头篮球三无账号 编辑:程序博客网 时间:2024/03/28 19:10

以下脚本可以自动过滤log文件,并用vi打开,方便比较

#!/usr/bin/env expect

exec grep recieve_sdc mylog >sdc

exec grep recieve_gold mylog >gold

spawn vim

send ":e sdc"

send "/n"

send ":vs gold"

send "/n"

interact

原创粉丝点击