eval - Evaluate ExpressionΒΆ

Evaluate an expression.

- command: eval <expression>
  [extractKey: <key>]

Argument

Description

expression

Expression to evaluate

key

Key in which to store the evaluated expression value

Supported operators:

Operator

Description

+

Addition, concatenation

-

Subtraction, Negation

/

Division

*

Multiplication

**

Power

%

Modulo

&

Bitwise And

|

Bitwise Or

^

Bitwise Xor

~

Bitwise Not

>>

Right shift

<<

Left shift

!

Inversion

&&

Logical And

||

Logical Or

?

Ternary True

:

Ternary False

??

Null coalescence

>

Greater than

<=

Less than or equal

>=

Greater than or equal

=~

Regex match

!~

Regex mismatch

Supported functions:

Function

Description

numeric(value [, unit])

Convert value to a numeric value. Optional unit for converting measurement results

Examples