1
0
Fork 0
bash/tests/misc/read-nchars.tests
Daniel Baumann fa1b3d3922
Adding upstream version 5.2.37.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-21 06:49:21 +02:00

11 lines
215 B
Text

# 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