#!/bin/expect -f
# run a program for a given amount of time
# i.e. timeout 20 long_running_program

set timeout [lindex $argv 0]
eval spawn -noecho [lrange $argv 1 end]
expect {
    timeout {
        exit 99
    }
    eof {
        exit 0
    }
}

