bug-bash
[Top][All Lists]
Advanced

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

Re: bash: variables inside 'while'


From: Paul Jarc
Subject: Re: bash: variables inside 'while'
Date: Fri, 31 Aug 2001 11:25:48 -0400
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

zach@cs.uni-bonn.de (Gabriel Zachmann) wrote:
> On Thu, 30 Aug 2001 12:11:56 -0400, Paul Jarc <prj@po.cwru.edu> wrote:
>>    while read p l; do ...; done < file; echo xx=$xx
>>  (but that will still break on some other sh'es.)
> 
> One more thought:
> 
> Your latter suggestion does not work when one wants to do something like
> 
>     cat file | sed ... | while read ....

This will work:
while read ... done < <(cat file | sed ...)
But it will break on even more other sh'es.  I think.  Dunno if that
matters to you.


paul



reply via email to

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