Probably I'm overseeing something obvious. But I can't get it to work.
I'm trying to create an Expect script that will capture the output from certain Cisco IOS commands and log them in a text file. Everything works fine, apart from the expect_out() output.
I've been searching for two days now, and thought it might be time to pop the question.
I've already tried changing the match_max value, but this doesn't seem to work.
Here's a snippet from the script
Code:
...
set IfIndex "show ip interfaces brief\r"
set termlength "terminal length 0\r"
send \r
send $termlength
expect {*#} {}
send $IfIndex
expect {*#} {}
set outcome $expect_out(buffer)
puts $outcome
...
And this is all I get as outcome, while I would expect several lines off text.
Can somebody point me to where I make my mistake.