?

Log in

Автоматизация на коленке - Indigoz swamp story [entries|archive|friends|userinfo]
Indigo

[ website | Welcome to the Brotherhood ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Автоматизация на коленке [дек. 30, 2013|01:31 pm]
Indigo
for i in $(cat des1228_actual); do ./dis_snmp_link_change_trap.sh $i; done

#!/usr/bin/expect
#
log_file "/root/scripting/expect.trn/log.log"
set addr [lindex $argv 0]
set username "username"
set password "password"
#
spawn telnet $addr
expect "UserName"
send "$username\r"
expect "PassWord"
send "$password\r"
expect "#"
send "config snmp linkchange_traps ports all disable\r"
expect "Success"
send "save\r"
expect "Success"
send "logout\r"
expect eof
#
СсылкаОтветить

Comments:
[User Picture]From: lets
2013-12-30 11:45 am
Неплохо!
(Ответить) (Thread)