! (not)

operator

Return type:
Switch
Returns:
True or false.
Syntax
(not | !) test-expression


Purpose

A logical operator that simply negates its operand. The resulting expression returns false if the operand evaluated to true, and vice versa. You may use either the exclamation mark ! or the word not for this operator.

Usage example:

  do when a < b and ! (c < d)
  ...
  done

Related Syntax