Re: set-e and command expansion

2024-02-04 Thread Kerin Millar
On Sun, 04 Feb 2024 20:27:56 +0300 Van de Bugger wrote: > Hi, > > bash version 5.2.21(1)-release (x86_64-redhat-linux-gnu) > Fedora Linux 38 > bash is installed from the Fedora repo, compiler I guess is gcc 13, probably > 13.2 or 13.2.1 > > All the test scripts follow the same scheme: > >

Re: set-e and command expansion

2024-02-04 Thread Greg Wooledge
On Sun, Feb 04, 2024 at 08:27:56PM +0300, Van de Bugger wrote: > Case 3: echo $(false) > > $ cat ./test > #!/bin/bash > set -e > echo before > echo $(false) > echo after > > $ ./test > before > > after > > Oops, in this case the script is NOT terminated before "echo after", but > co

set-e and command expansion

2024-02-04 Thread Van de Bugger
Hi, bash version 5.2.21(1)-release (x86_64-redhat-linux-gnu) Fedora Linux 38 bash is installed from the Fedora repo, compiler I guess is gcc 13, probably 13.2 or 13.2.1 All the test scripts follow the same scheme: #!/bin/bash set -e echo before COMMAND echo after Let's consider few