2
我做這樣的事情:如何檢查在期望腳本中是否設置了變量?
#!/usr/bin/expect -f
if {$out != ""} {
send_user $out
}
但它不工作。錯誤信息:
can't read "out": no such variable
while executing
"if {$out != ""} {
send_user $out
}"
(file "./test" line 3)
我覺得你的意思是''變量確實存在''而不是''變量不存在「':-) –
謝謝,現在糾正它:) – Dinesh