[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: catching the statuts of sourced unamed pipe?
From: |
Kerin Millar |
Subject: |
Re: catching the statuts of sourced unamed pipe? |
Date: |
Sun, 22 Jan 2023 03:32:28 +0000 |
On Sat, 21 Jan 2023 20:30:09 -0600
Peng Yu <pengyu.ut@gmail.com> wrote:
> Hi,
>
> The return status of the sourced unnamed pipe is not available. What
> is the best way to catch the return status of the unnamed pipe?
> Thanks.
>
> source <(false) || echo "$?"
$ : <(false); wait $!; echo $?
1
Quoting the bash-4.4-alpha release notes:
u. Bash now allows waiting for the most recent process substitution, since it
appears as $!.
--
Kerin Millar