解决 “cannot interact with self” 报错
使用 expect 工具进行自动化交互时,产生如下错误:cannot interact with self - set spawn_id to a spawned process while executing"interact" (file "./test" line 14)分析原因:脚本中使用多个条件判断,在使用时,所有分支均未满足条件,未执行任何命令,最后执行了 interact 命令,因此报错。解决办法: 将 interact 换成 expect eof 即可二者区
原创
2022-02-22 13:59:57 ·
368 阅读 ·
0 评论