bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error in read implementation and/or documentation


From: Chris Down
Subject: Re: Error in read implementation and/or documentation
Date: Sat, 27 Jul 2013 17:35:49 +0200

Hello,

On 27 July 2013 06:37, Peter Olson <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]