OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [expect/] [example/] [reprompt] - Rev 1782

Compare with Previous | Blame | View Log

#!/depot/path/expect --

# Name: reprompt
# Description: reprompt every so often until user enters something
# Usage: reprompt timeout prompt
# Author: Don Libes, NIST

foreach {timeout prompt} $argv {}

send_error $prompt
expect {
        timeout {
                send_error "\nwake up!!\a"
                send_error \n$prompt
                exp_continue
        }
        -re .+ {
                send_user $expect_out(buffer)
        }
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.