bug-bash
[Top][All Lists]
Advanced

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

Re: bash accepts script with incorrect syntax and goes into infinite loo


From: Dave B
Subject: Re: bash accepts script with incorrect syntax and goes into infinite loop
Date: Fri, 9 Oct 2009 11:24:43 +0100
User-agent: KMail/1.11.4 (Linux/2.6.28-15-generic; KDE/4.2.4; x86_64; ; )

On Friday 09 October 2009, Pierre Gaston wrote:

> > Repeat-By:
> >        printf '%s\n%s\n' foo bar | while read NAME;
> >        echo NAME=$NAME
> >        do
> >            echo blah
> >        done
>
> Not sure what is the incorrect syntax, and it seems normal that it goes
> into an infinite loop since echo is always true.

Well, it seems to me (and as stated in the bug report) that a "do" should 
follow the "while read NAME;".

-- 
D.




reply via email to

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