blob: 40b1f982a5b0fa51151f4d0d6a0bc270e71a35a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
# interactive
# from tty
read -n 3 -p 'enter three chars: ' xyz
echo
echo $xyz
# using readline
read -p 'enter 3 chars: ' -e -n 3 abc
# readline outputs a newline for us, so we don't need the extra echo
echo $abc
|