Hello,
On 27 July 2013 06:37, Peter Olson <polson136@gmail.com> wrote:
If read is invoked with the -n or -N options, then given an EOF, it returns
with a zero exit status.
Cannot reproduce.
$ echo $BASH_VERSION
4.2.45(2)-release
$ read -n1 </dev/null
$ echo $?
1
$ read -N1 </dev/null
$ echo $?
1
In addition, if it is invoked with -n 3, for example, then given EOF for one
of the first 2 characters, it still waits for all 3 characters.
Cannot reproduce.
$ printf 01 | read -n3
$ echo $?
1
Best,
Chris