私のスクリプトでは、一致しない文字列を返したいと思っています。試してみ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 }"
}