On Mon, Aug 31, 2026 at 09:53:50AM -0400, Chet Ramey wrote: > On 8/31/26 5:42 AM, Mike Jonkmans wrote: > > $ ( set -e; ! ; echo foo ) ## foo (expected no output) > > A `false pipeline' (see my message to kre) exits with status 1, but the > null command is still having its exit status inverted, so it doesn't > cause the shell to exit. That's more consistent -- every time you see a > `!' it means the exit status is being inverted and `set -e' doesn't > apply -- but not exactly in the letter of the interpretation.
It's fine. Unprobable set-e-niche-case that should be checked by script authors. > > From the bash manual: > > The format for a pipeline is: > > [time [-p]] [ ! ] command1 [ [|⎪|&] command2 ... ] > > > > Assuming command1 can not be empty (which is not explicitly documented). > > > > In the bash-implementation a pipeline is more like: > > [time [-p]] [ ! ] [ command1 [ [|⎪|&] command2 ... ] ] > > See the grammar changes from interp 267. To be read at: https://www.austingroupbugs.net/view.php?id=267 Has a kre remark also! That ticket took 14 years to complete! It's a can of wurms. Thanks for the clarifications. -- Regards, Mike Jonkmans
