Skip to main content

Expect - run rup on a named host

#!/usr/bin/expect

log_user 0

send "Which host do you want to rup? "
expect {
\n {set host [string trim $expect_out(buffer)]}
timeout {puts "\nNot fast enough"; exit}
}

spawn rup $host
expect {
"\n" {
puts -nonewline $expect_out(buffer)
flush stdout
exp_continue
}
eof {
puts "done"
}
}

Comments

Popular posts from this blog

Testing Network Faults Connection

Testing Network Faults Connection Keywords: network | ping | trace | telnet | connection | setup | hardware Summary: Help with testing connection or network problems. 1. Introduction 2. Testing Your Network 3. Using the command line 4. Ping - "Can my data reach the destination?" 5. Traceroute - "How does my data reach its destination?" 6. DNS Lookup - "Is my data going to the right address? " 7. Netstat - "What's my computer connecting to? " 8. Telnet - "Can I connect to it?" 9. Netshell - "One-stop network check" 1. Introduction There are many possible causes of connection problems. This guide will show how you can investigate problems using some simple tools that come with most versions of Windows. To use all of the tools though, you will need Windows XP. 2. Testing your network The tools in ...