【发布时间】:2013-06-08 05:19:46
【问题描述】:
我通过 shell 脚本中的命令行在 Expect 中传递参数。
我试过了
#!/usr/bin/expect -f
set arg1 [lindex $argv 0]
spawn lockdis -p
expect "password:" {send "$arg1\r"}
expect "password:" {send "$arg1\r"}
expect "$ "
但它不起作用。我该如何解决?
【问题讨论】: