source:
vendor/bash/3.1/tests/read3.sub
| Last change on this file was 3228, checked in by , 19 years ago | |
|---|---|
| File size: 246 bytes | |
| Line | |
|---|---|
| 1 | # non-interactive |
| 2 | |
| 3 | # error |
| 4 | read -n -1 |
| 5 | |
| 6 | # from pipe -- should work, but doesn't change tty attributes |
| 7 | echo abcdefg | { |
| 8 | read -n 3 xyz |
| 9 | echo $xyz |
| 10 | } |
| 11 | |
| 12 | # fewer chars than specified |
| 13 | echo ab | { |
| 14 | read -n 3 xyz |
| 15 | echo $xyz |
| 16 | } |
| 17 | |
| 18 | read -n 1 < $0 |
| 19 | echo "$REPLY" |
Note:
See TracBrowser
for help on using the repository browser.
