Table of Contents

What does the OR Boolean operator in a list of bash command? ie ||

About

The OR list operator is :

Example

In the following example:

command1 || command2
Sh

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.