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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [expect/] [example/] [reprompt] - Blame information for rev 1778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#!/depot/path/expect --
2
 
3
# Name: reprompt
4
# Description: reprompt every so often until user enters something
5
# Usage: reprompt timeout prompt
6
# Author: Don Libes, NIST
7
 
8
foreach {timeout prompt} $argv {}
9
 
10
send_error $prompt
11
expect {
12
        timeout {
13
                send_error "\nwake up!!\a"
14
                send_error \n$prompt
15
                exp_continue
16
        }
17
        -re .+ {
18
                send_user $expect_out(buffer)
19
        }
20
}

powered by: WebSVN 2.1.0

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