更新时间:2023-01-16 08:09:51
也许:
log_user 0 ;# turn off the usual output
spawn telnet@ip
expect -re "*login*"
send "root\r"
expect -re "password*"
send "****\r"
send "ovs-vsctl *******"
expect eof
puts $expect_out(buffer) ;# print the results of the command