source: trunk/essentials/app-shells/bash/tests/misc/read-nchars.tests

Last change on this file was 3228, checked in by bird, 18 years ago

bash 3.1

File size: 215 bytes
Line 
1# interactive
2
3# from tty
4read -n 3 -p 'enter three chars: ' xyz
5echo
6echo $xyz
7
8# using readline
9read -p 'enter 3 chars: ' -e -n 3 abc
10# readline outputs a newline for us, so we don't need the extra echo
11echo $abc
Note: See TracBrowser for help on using the repository browser.