[英]What does spawn ,expect and send command in linux/unix
The following three lines having three commands(spawn,expect,send), but what it does actually. 以下三行有三个命令(spawn,expect,send),但它实际上做了什么。 Please explain any one
请解释任何一个
spawn ssh -oStrictHostKeyChecking=no -oCheckHostIP=no usr@$myhost.example.com'<br>
expect "password"<br>
send "$PWD\n" <br>
EOD
It is part of an expect script: 它是expect脚本的一部分:
spawn
opens a new process spawn
打开一个新进程
expect
waits for the previous spawned process to output the "expected" string (password in this case) expect
等待先前生成的进程输出“预期”字符串(在这种情况下为密码)
send
writes to the spawned process stdin send
写入send
到生成的进程stdin
EOD
has no meaning in expect, perhaps it is part of another script? EOD
没有任何意义,也许它是另一个脚本的一部分?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.