[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: set -e in subshell
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: set -e in subshell |
Date: |
Mon, 16 Nov 2020 19:57:13 +0100 |
you instruct the subshell to set -e, ..
On Fri, Nov 13, 2020, 17:16 Aron Griffis <aron@arongriffis.com> wrote:
> GNU bash, version 5.0.17(1)-release (x86_64-redhat-linux-gnu)
>
> $ (set -e; false; echo BANG) || echo whimper
> BANG
>
> $ (set -e; false; echo BANG); echo whimper
> whimper
>
> The || after the subshell seems to prevent set -e from being effective
> inside the subshell.
>
> Is this a bug or does it make sense in a way I don't understand?
>
> Thanks,
> Aron
>