From 772f20abb0a3a0979c440114bf3a1cff5b3cef03 Mon Sep 17 00:00:00 2001 From: cvpcs Date: Wed, 2 Jun 2010 11:02:31 -0500 Subject: initial import of bash 4.1 --- tests/misc/read-nchars.tests | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/misc/read-nchars.tests (limited to 'tests/misc/read-nchars.tests') diff --git a/tests/misc/read-nchars.tests b/tests/misc/read-nchars.tests new file mode 100644 index 0000000..40b1f98 --- /dev/null +++ b/tests/misc/read-nchars.tests @@ -0,0 +1,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 -- cgit v1.1