Table of Contents

Bash - Boolean / Logical Operator

About

This page is about Boolean operator in bash.

Bash has other type of operators

List

Symbol Logic
&& What is the AND / && Boolean operator in the Bash Shell?
|| What does the OR Boolean operator in a list of bash command? ie ||
! not

Details:

! expression
expression1 && expression2
 
expression1 || expression2

The && and || operators do not evaluate expression2 if the value of expression1 is sufficient to determine the return value of the entire conditional expression.