source:
vendor/bash/3.1-p17/tests/read2.sub
Last change on this file was 3228, checked in by , 18 years ago | |
---|---|
File size: 199 bytes |
Line | |
---|---|
1 | a=4 |
2 | |
3 | read -t 2 a < /dev/tty |
4 | echo $? |
5 | |
6 | echo $a |
7 | |
8 | sleep 5 | read -t 1 a |
9 | echo $? |
10 | |
11 | echo $a |
12 | |
13 | read -t -3 a < /dev/tty |
14 | echo $? |
15 | |
16 | echo $a |
17 | |
18 | # the above should all time out |
19 | echo abcde | { |
20 | read -t 2 a |
21 | echo $a |
22 | } |
Note:
See TracBrowser
for help on using the repository browser.