> > 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 <wool...@eeg.ccf.org> 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. >