Jari Aalto | bb70624 | 2000-03-17 21:46:59 +0000 | [diff] [blame] | 1 | # interactive |
2 | |||||
3 | # from tty | ||||
4 | read -n 3 -p 'enter three chars: ' xyz | ||||
5 | echo | ||||
6 | echo $xyz | ||||
7 | |||||
8 | # using readline | ||||
9 | read -p 'enter 3 chars: ' -e -n 3 abc | ||||
10 | # readline outputs a newline for us, so we don't need the extra echo | ||||
11 | echo $abc |