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