|
发表于 2005-9-22 23:31:22
|
显示全部楼层
Post by hjp0021
如:从shell脚本中得到了几个变量的值,接着在脚本中调用写好的expect程序登陆到远程设备上执行命令,该expect程序要用到前面shell得到的变量值。如何才能传递过来?
谢谢!
use position variables. Such as:
- In shell:
- foo.exp $a $b $c
- In expect:
- set var1 [lrange $argv 0 0]
复制代码
Then $var1 in expect takes the value of $a in shell script. |
|