[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: anonymous pipes in recursive function calls
From: |
konsolebox |
Subject: |
Re: anonymous pipes in recursive function calls |
Date: |
Sun, 30 Jun 2024 02:28:07 +0800 |
On Sat, Jun 29, 2024 at 10:23 PM Zachary Santer <zsanter@gmail.com> wrote:
>
> On Sat, Jun 29, 2024 at 4:40 AM konsolebox <konsolebox@gmail.com> wrote:
> >
> > You can avoid pipe recursions by storing the output first in an array.
>
> So is this a known issue?
I don't know. I haven't really checked your issues. I just think
avoiding too many opened pipes at the same time should be intuitive
and it's likely going to fix whatever issue there is.
> > There's also no need to use an error flag variable. Just make sure
> > return calls are chained.
>
> The intention here is to report as many error conditions as possible
> before exiting.
You can print an error message before calling return. Are you
planning to run more commands even if an error has already happened?
> Filling an array of paths and then looping over it in a subsequent for
> loop wouldn't actually be unreasonable here, considering how many
> paths there are. It just feels like bad practice.
Why do you think it's a bad practice?
> There's always the
> possibility of busting out the named pipes again. Bash 4.2 couldn't
> wait for process substitutions.
The solution I suggested doesn't use process substitution so I'm not
sure what you mean.
--
konsolebox
Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Zachary Santer, 2024/06/28
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Greg Wooledge, 2024/06/28
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Zachary Santer, 2024/06/28
- anonymous pipes in recursive function calls, Zachary Santer, 2024/06/28
- Re: anonymous pipes in recursive function calls, konsolebox, 2024/06/29
- Re: anonymous pipes in recursive function calls, Zachary Santer, 2024/06/29
- Re: anonymous pipes in recursive function calls,
konsolebox <=
- Re: anonymous pipes in recursive function calls, Zachary Santer, 2024/06/29