[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: set -e doesn't trigger when command substitutions returns, why?
From: |
Robert Elz |
Subject: |
Re: set -e doesn't trigger when command substitutions returns, why? |
Date: |
Thu, 19 Jun 2025 17:50:20 +0700 |
Date: Thu, 19 Jun 2025 09:27:20 +0200
From: microsuxx <fxmbsw7@gmail.com>
Message-ID:
<CAALKErHFcEEvDA87cOD74eHvAmCTOpNuKFkwexSu4F3RgHAW2g@mail.gmail.com>
| bash -e -c 'echo $(exit 1) ; wait -n ; echo survived'
You really need to stop proposing nonsense when you have no idea
what is happening, or why:
bash -ec 'true; wait -n; echo survived'
no output. The wait -n is returning an error, there's nothing
to wait for, the '-e' test is detecting that failing. What
came before is irrelevant. The same in your case (try exit 0).
kre
- set -e doesn't trigger when command substitutions returns, why?, Никола Константинов Кралев, 2025/06/18
- Re: set -e doesn't trigger when command substitutions returns, why?, Greg Wooledge, 2025/06/18
- Re: set -e doesn't trigger when command substitutions returns, why?, Steffen Nurpmeso, 2025/06/18
- Re: set -e doesn't trigger when command substitutions returns, why?, microsuxx, 2025/06/18
- Re: set -e doesn't trigger when command substitutions returns, why?, Никола Константинов Кралев, 2025/06/18
- Re: set -e doesn't trigger when command substitutions returns, why?, microsuxx, 2025/06/19
- Re: set -e doesn't trigger when command substitutions returns, why?, microsuxx, 2025/06/19
- Re: set -e doesn't trigger when command substitutions returns, why?, Никола Константинов Кралев, 2025/06/23
- Re: set -e doesn't trigger when command substitutions returns, why?, Lawrence Velázquez, 2025/06/24
- Re: set -e doesn't trigger when command substitutions returns, why?,
Robert Elz <=
Re: set -e doesn't trigger when command substitutions returns, why?, Chet Ramey, 2025/06/18