Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/expect
set timeout 20
set name [lindex $argv 0]
set user [lindex $argv 1]
set password [lindex $argv 2]
spawn telnet $name
expect "login: "
send "$user\n"
expect "Password: "
send "$password\n"
expect "$ "
send "monitor/trafficMtr/summary wanId 1\n"
expect "Percentage of this Month's Limit"
expect "$ "
send "exit\n"
expect eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment