I've got the following expect script
My question how do I read the buffer once expect has exited?
Mike
"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
Code:
#!/usr/local/bin/expect -f
spawn telnet servera
expect "Login:"
send "username\r"
expect "Password"
send "password\r"
expect "Enter Selection"
send "1\r"
expect "servera#"
send "ls\r"
set results $expect_out(buffer)
send "exit\r"
expect eof
My question how do I read the buffer once expect has exited?
Mike
"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."