在我的脚本中,我想返回不匹配的字符串。我试过puts $expect_out(buffer)
了,但它没有用,并给了我以下错误
can't read "expect_out(buffer)": no such variable
while executing
"puts "out is $expect_out(buffer)" "
代码
expect {
-nocase -re "$arg3" { exit 0 }
timeout { puts "Does not matched, output is $expect_out(buffer)" ; exit 2 }"
}