I am using the Expect Linux tool and I have to interact with the shell. However, it's not a true interact, I just want to see what's going on. How can I get Expect to exit after the interacting program exits?
我正在使用Expect Linux工具,我必须与shell进行交互。然而,这不是真正的互动,我只是想看看发生了什么。在交互程序退出后如何让Expect退出?
1 个解决方案
#1
Never mind, I found it.
没关系,我找到了。
interact $
Will cause expect to exit when it encounters the string $
.
当遇到字符串$时会导致退出。
#1
Never mind, I found it.
没关系,我找到了。
interact $
Will cause expect to exit when it encounters the string $
.
当遇到字符串$时会导致退出。