tech note

インフラ技術や車についてつぶやいていくブログ

expect

ProCurveスイッチの設定を自動で変更できるexpectを作った

Expect構文 #!/usr/bin/expect set timeout 5 set IP [lindex $argv 0] spawn telnet $IP expect { -glob "Username:" { send "manager\n" exp_continue } -glob "Password:" { send "PASSWORD\n" } -glob "Press any key to continue" { send "\n" } } expe…