Reputation: 29
I was debugging the expect script wherein i came across a line which was giving me incomplete output.
./worldbox.exp 30.30.30.30 username password 7 > /tmp/30.30.30.30.txt
For value 7, the code in worldbox.exp looks like below.
elseif {[lindex $argv 3] == 7} {
expect {
timeout {
puts "Connection timed out"
exit 1
}
"yes/no" {
send "yes\r"
exp_continue
}
"password:" {
send -- "[lindex $argv 2]\r"
exp_continue
}
"log_echo" {
send "dvreng list-ipg\rexit\r"
exp_continue
}
interact
}
}
Now when i execute the command (dvreng list-ipg) manually, I am getting the complete output. But when I
run the script, I am getting incomplete output. I want to know how to get the complete output via expect script.
Upvotes: 0
Views: 217
Reputation: 247250
The "interact" there is a pattern for expect, not a command.
Upvotes: 1