Table of Contents

About

This page is about Boolean operator in bash.

Bash has other type of operators

List

Details:

! expression
  • True if both expression1 and expression2 are true.
expression1 && expression2
  • True if either expression1 or expression2 is true.
 
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.