hi!
  im trying to get the average i/o rate of my router (e.g. s0 and s1)
using expect script.  the script is working but it echoes the command
on the terminal. how do i disable it so that it would only display the
required result?  and how do i display the particular lines that says 
"5 minute input rate...." and "5 minute output rate..." ?

thanks,
tricia

#!/usr/bin/expect --

send "Connecting...\n"
spawn "telnet"
send "open router1.mydomain.com\r"
expect "Username:"
send "myusername\r"
expect "Password:"
send "mypassword\r"
expect "Router>"
send "en\r"
expect "Password:"
send "mysecret\r"
expect "Router#"
send "sh in $argv\r"
expect "Router#"
send "exit\r"

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to