News for hackers. Stuff that matters.
Re:Test, [, and [[ (2020) by Calzifer on Thursday November 23, 2023 @04:59PM (#38398035)
No it won't. set -e is implicit disabled for the first command with && and ||. Same for a command after if/while/until and after !. It should only matter if you implicit return immediately after.

  $ bash -ec 'if [ 1 = 2 ]; then echo true; fi; echo $?'
  0
  $ bash -ec '[ 1 = 2 ] && echo true; echo $?'
  1
In both cases it does not quite and execute the last echo.

There are no comments on this comment yet.