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:
- True if expression is false.
! 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.