| (or)

operator

Return type:
Switch
Returns:
True or false.
Syntax
switch expression | switch expression
    


Purpose

The operator | is a logical operator that evaluates to true if either or both of the operands evaluates to true. If both evaluate to false, then the result of | is also false. If the left-hand operand evaluates to true, the second is not evaluated.

For example:

  do when a < b | c < d
     output "Hello, World!%n"
  done
          

The keyword or is a deprecated form of |.

Related Syntax
Related Concepts