bug-bash
[Top][All Lists]
Advanced

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

Fwd: read builtin return non-zero status reason


From: Cuong Manh Le
Subject: Fwd: read builtin return non-zero status reason
Date: Wed, 24 Feb 2016 11:31:40 +0700

I send this email to help-bash but it seems to be inactive. Please help me with this problem. Thanks.

---------- Forwarded message ----------
From: Cuong Manh Le <address@hidden>
Date: Wed, Feb 24, 2016 at 11:14 AM
Subject: read builtin return non-zero status reason
To: address@hidden


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?

IMHO, the second reason is correct.

The full story is here: http://unix.stackexchange.com/q/265149/38906. I and the other one have conflict about this.

Correct me if I'm wrong.

Thanks.


reply via email to

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