[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 01:45:23 +0200 |
i did
with printf $BASHPID
bye
On Fri, Apr 1, 2022 at 1:41 AM Peng Yu <pengyu.ut@gmail.com> wrote:
> I don't get how to modify the while-loop (with unnamed pipes in the
> body) to get the exit code in the loop input unnamed pipe. Could you
> make it clear by showing a working example? Thanks.
>
> On 3/31/22, Chet Ramey <chet.ramey@case.edu> wrote:
> > On 3/30/22 6:32 PM, Peng Yu wrote:
> >> I am not sure how wait for "$!" would work robustly.
> >
> > You have to capture $! before it can be overwritten by another command.
> For
> > instance, you can assign it to another variable.
> >
> >> In the following example, it can not get the error in the input.
> >
> > Because you didn't do that.
> >
> > --
> > ``The lyf so short, the craft so long to lerne.'' - Chaucer
> > ``Ars longa, vita brevis'' - Hippocrates
> > Chet Ramey, UTech, CWRU chet@case.edu
> http://tiswww.cwru.edu/~chet/
> >
>
>
> --
> Regards,
> Peng
>
>
- Re: reading from external command, (continued)
- Re: reading from external command, Lawrence Velázquez, 2022/03/30
- Re: reading from external command, Alex fxmbsw7 Ratchev, 2022/03/30
- Re: reading from external command, Peng Yu, 2022/03/30
- Re: reading from external command, Alex fxmbsw7 Ratchev, 2022/03/30
- Re: reading from external command, Alex fxmbsw7 Ratchev, 2022/03/31
- Re: reading from external command, Alex fxmbsw7 Ratchev, 2022/03/31
- Re: reading from external command, Chet Ramey, 2022/03/31
- Re: reading from external command, Peng Yu, 2022/03/31
- Re: reading from external command,
Alex fxmbsw7 Ratchev <=
- Re: reading from external command, Alex fxmbsw7 Ratchev, 2022/03/31
- Re: reading from external command, Alex fxmbsw7 Ratchev, 2022/03/31
- Re: reading from external command, Alex fxmbsw7 Ratchev, 2022/03/31
- Re: reading from external command, Lawrence Velázquez, 2022/03/31
- Re: reading from external command, Peng Yu, 2022/03/31
- Re: reading from external command, Lawrence Velázquez, 2022/03/31
- Re: reading from external command, Alex fxmbsw7 Ratchev, 2022/03/31
- Re: reading from external command, Peng Yu, 2022/03/31
- Re: reading from external command, Alex fxmbsw7 Ratchev, 2022/03/31