#!/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"
}
}
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
Post a Comment