About
The OR list operator is :
- a boolean operator ||
- used as command separator (ie control operatro) in a list.
- that indicates that:
- the next command is executed if, and only if,
- the previous command returns a non-zero exit status (false).
Example
In the following example:
command1 || command2
the command2 is executed if, and only if, command1 returns a non-zero exit status (false).
Left associativity
OR lists are executed with left associativity.
Exit status
The return status is the exit status of the last command executed in the list.