#!/usr/bin/expect -f
set timeout 5
set machine "[lindex $argv 0]"
#set username "[lindex $argv 1]"
#set password "[lindex $argv 2]"
#set command "[lindex $argv 3]"
#spawn ssh "$machine" -l woot sudo uptime
spawn ssh "$machine" -l woot sudo grep 3w-xxxx /var/log/messages
expect "*?assword:*" {
exp_send "\r"
}
puts "\n\n done. "