I want to use expect_out to get the output for the last send for the following snippet
while {[gets $cmds command]>=0} {
send "$command\r"
expect "*"
set result $expect_out(buffer)
puts $gout $result
}
but expect_out(buffer) seems to maintain all previous outputs how can I achieve my goal? thanks
$expect_out(buffer)
will hold at all, other than that it is enough to match what theexpect
that produced it required to match. - Donal Fellows