help-bash
[Top][All Lists]
Advanced

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

Re: reading from external command


From: Alex fxmbsw7 Ratchev
Subject: Re: reading from external command
Date: Fri, 1 Apr 2022 05:04:34 +0200

another one to thread peng like the ignorants
when he s so ignorant sure

On Fri, Apr 1, 2022 at 5:03 AM Peng Yu <pengyu.ut@gmail.com> wrote:

> OK. I missed it. Thanks.
>
> On 3/31/22, Lawrence Velázquez <vq@larryv.me> wrote:
> > On Thu, Mar 31, 2022, at 9:01 PM, Peng Yu wrote:
> >> Where?
> >
> > https://lists.gnu.org/archive/html/help-bash/2022-03/msg00072.html
> >
> > Reproduced here:
> >
> >     % cat main.bash; echo
> >     printf '%s\n' "$BASH_VERSION"
> >
> >     {
> >         pid=$!
> >         while read -r x; do
> >             echo <(exit 42)
> >         done
> >     } < <(builtin printf '%s\n' a b c; exit 99)
> >
> >     wait "$pid"
> >     echo "$?"
> >
> >     % bash main.bash
> >     5.1.16(1)-release
> >     /dev/fd/62
> >     /dev/fd/62
> >     /dev/fd/62
> >     99
> >
> >> Without requiring a temp file?
> >
> > No temporary files are involved, unless you count the temporary
> > FIFOs inherent to using process substitution on systems that don't
> > have /dev/fd.
> >
> > --
> > vq
> >
>
>
> --
> Regards,
> Peng
>
>


reply via email to

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