Re: I think bash logic in a loop like : while [ condition] |read somevar
From:
Suvayu Ali
Subject:
Re: I think bash logic in a loop like : while [ condition] |read somevar is flawed.
Date:
Mon, 30 Dec 2013 17:22:03 +0100
User-agent:
Mutt/1.5.22.1-rc1 (2013-10-16)
Hi,
On Thu, Dec 26, 2013 at 06:22:19PM -0500, Chet Ramey wrote:
> On 12/25/13, 1:33 AM, Pierre Gaston wrote:
>
> > If I remember correctly, POSIX allows the lastpipe behaviour.
>
> It does, in its usual fashion: "each command of a multi-command pipeline
> is in a subshell environment; as an extension, however, any or all
> commands in a pipeline may be executed in the current environment."
Is there any technical reason to choose one over the other? Or is it
not really a choice, and is determined by other limitations of the
shell?
Thanks for any explanations,
--
Suvayu
Open source is the future. It sets us free.