expect telnet批量执行多个厂家交换机判断设备厂家
Tofloor
poster avatar
su_bbc
deepin
2015-08-04 06:10
Author
本帖最后由 su_bbc 于 2015-8-3 23:48 编辑

expect  批量执行telnet多个厂家交换机,如何判断设备厂家并执行相关命令

#!/usr/bin/expect
log_file chack.log
log_user 1
set timeout 5
set ip [lindex $argv 0]
set username [lindex $argv 1]
set password [lindex $argv 2]
spawn telnet $ip 5357
expect    "Username:" "login:" "(none) login:"
send      "$username\r"
expect    "assword:"
send      "$password\r"
expect    "/ $"
send      "help\r"
expect eof

麻烦各位大神帮忙解决下,先谢了!


···············以找到方法··············



Reply Favorite View the author
All Replies

No replies yet

New Thread

Popular Events

More
国际排名
WHLUG