bug-bash
[Top][All Lists]
Advanced

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

Re: Fwd: read builtin return non-zero status reason


From: Cuong Manh Le
Subject: Re: Fwd: read builtin return non-zero status reason
Date: Wed, 24 Feb 2016 21:18:42 +0700

It's the same thing.  "Reached EOF before seeing the delimiter" is the
whole, combined reason.

How can we verify it?

Stephane Chazelas also have the same opinion with me in his answer http://unix.stackexchange.com/a/265484/38906, that's error came from no delimiter found.

IMHO, it will be better if bash can return different status code for two cases.

Thanks.

On Wed, Feb 24, 2016 at 8:37 PM, Greg Wooledge <address@hidden> wrote:
On Wed, Feb 24, 2016 at 11:31:40AM +0700, Cuong Manh Le wrote:
> I send this email to help-bash but it seems to be inactive. Please help me
> with this problem. Thanks.

help-bash is active.  You probably just didn't wait long enough.
If this is your first message to help-bash, your message is probably
waiting in some moderation/antispam queue.

> The bash read builtin documentation said that when read reached EOF, it's
> return non-zero status. So in:
>
> read -d '' l <<- EOF
>     test
> EOF
>
>
> Did read return non-zero status because of it reached EOF or it failed to
> read the whole input because it could not find the delimiter?

It's the same thing.  "Reached EOF before seeing the delimiter" is the
whole, combined reason.


reply via email to

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