Evaluates the expression on the right and then assigns a new field or replaces the old field value. You can enter any combination of expressions that can be evaluated to value on the right side.
- Statement to assign the value obtained by evaluating the expression to a new or old field. You can enter any combination of expressions that can be evaluated to value on the right side. Use commas (
,) as a separators to specify multiple pairs of assignments. If there are multiple pairs of
FIELD=EXPR, the command evaluates them in order from the left.
int("100")function to convert the string to an integer and then assign it to the num field
eval num = int("100")
typeof()to assign the type of a specific value to the type field
eval type = typeof("string") eval type = typeof(100)
Sum up the field values
eval total = sent + rcvd
Assign the results of executing the
concat("hello", ", world")function to the msg field
eval msg = concat("hello", ", world")