help-bash
[Top][All Lists]
Advanced

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

[Help-bash] read builtin return non-zero status reason


From: Cuong Manh Le
Subject: [Help-bash] read builtin return non-zero status reason
Date: Wed, 24 Feb 2016 11:20:46 +0700

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]