Greg, thank you -- this was exactly what I've been failing to find.
And there's even a solution that looks good for my *actual* problem.
-Original Message-
From: Greg Wooledge
Sent: Tuesday, April 2, 2024 3:35 PM
To: Linde, Evan
Cc: bug-bash@gnu.org
Subject: Re: Scope change in loops wi
On Tue, Apr 02, 2024 at 08:08:57PM +, Linde, Evan wrote:
> In a loop constructed like `... | while read ...`, changes to
> variables declared outside the loop only have a loop local
> scope, unlike other "while" or "for" loops.
https://mywiki.wooledge.org/BashFAQ/024
In a loop constructed like `... | while read ...`, changes to
variables declared outside the loop only have a loop local
scope, unlike other "while" or "for" loops.
So far, I have found this in every bash version I have tested
(as low as 3.2.57 on an old mac and as high as 5.2.15).
Nothing obvio
On Mon, 1 Apr 2024, Chet Ramey wrote:
On 4/1/24 3:24 PM, Chet Ramey wrote:
On 3/14/24 5:58 AM, Carl Edquist wrote:
Well, *without multi-coproc support*, here's a simple wc example; first
with a single coproc:
$ coproc WC { wc; }
$ exec {WC[1]}>&-
$ read -u ${WC[0]} X
On 4/2/24 4:33 AM, G. Branden Robinson wrote:
At 2024-04-01T09:27:27-0400, Chet Ramey wrote:
On 3/28/24 5:11 PM, G. Branden Robinson wrote:
Now that we're using a correct caret/circumflex/hat glyph on
modern typesetters (and terminals with a Unicode repertoire), drop the
thicket of partial-line
At 2024-04-01T09:27:27-0400, Chet Ramey wrote:
> On 3/28/24 5:11 PM, G. Branden Robinson wrote:
> > Now that we're using a correct caret/circumflex/hat glyph on
> > modern typesetters (and terminals with a Unicode repertoire), drop the
> > thicket of partial-line motion and type size-altering escap