tcl - 如何在 Expect/Tcl 中发送 ctrl+d?
问题描述
以下在发送后挂起foo\r
(ctrl+d
未触发)。
编辑:不知何故,用\x04
作品\x04\x04
代替。不知道为什么必须发送两次控制字符...</p>
expect {
-re {Type foo and press enter, then ctrl\+d} {
send "foo\r\x04"
}
}
解决方案
推荐阅读
- image - 如何使图像背景变为白色而不是黑色?
- arrays - 一维数组---->二维或多维数组代码
- javascript - $.get 回调函数未执行
- c# - 如何在不重复代码的情况下从/实现 C# 类层次结构
- python-3.x - Python 优先队列。如何获取()数据元素而不是其优先级编号?
- c++ - Boost.Numeric.Odeint 步进器的流/保存/序列化内部状态
- reactjs - React 有时会在两个 setState 之间重新渲染,具体取决于 setState 顺序
- python - 如何使用 S3Boto3Storage 在 django 中上传图像,其中路径是从 django 中的视图动态设置的
- python - 如何从保存的数据创建数据框,在函数中计算
- reactjs - npm create-react-app myapp 给出错误命令失败:create-react-app spawn EPERM