Skip to main content
Version: v1.11.0

or

Aggregate Function

or logical OR of input values

Synopsis

or(bool) -> bool

Description

The or aggregate function computes the logical OR over all of its input.

Examples

Ored value of simple sequence:

echo 'false true false' | zq -z 'or(this)' -

=>

true

Continuous OR of simple sequence:

echo 'false true false' | zq -z 'yield or(this)' -

=>

false
true
true

Unrecognized types are ignored and not coerced for truthiness:

echo 'false "foo" 1 true false' | zq -z 'yield or(this)' -

=>

false
false
false
true
true