bug-bash
[Top][All Lists]
Advanced

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

Re: no trailing newline causes read to fail


From: Paul Jarc
Subject: Re: no trailing newline causes read to fail
Date: Mon, 04 Oct 2004 09:50:34 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

Stephane Chazelas <Stephane_Chazelas@yahoo.fr> wrote:
> On Fri, Oct 01, 2004 at 01:11:41PM -0400, Paul Jarc wrote:
>> Stephen Samuel <samuel@bcgreen.com> wrote:
>>>     At the end of the loop '$line' is empty (i.e. the last line is lost).
>> 
>> See entry E4 in the bash FAQ.
> [...]
>
> No, E4 is about read being run in a subshell. OP's problem is
> for read on non-text input (an unterminated line causes read to
> exit with a non-zero exit status).

No.  "read" still sets the variable even in this case, so it does not
explain the complaint above about the variable being empty.  That is
explained by FAQ entry E4.


paul




reply via email to

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