|||
| :-- | :-- |
| a; b | run a, then run b |
| a && b | run a, if succeeded, then run b |
| a || b | run b, if failed, then run b |
is equivalent to:
Run <list1> when <list0> exit with code 0, elsewhere run <list2>.
(Built-in command) Conditional brackets, you can think the left bracket as a program. The “program” returns an error code depending on the <expression>. [[ is an enhanced version of [ which may not be available in lower versions of bash.