miller/docs/data/begin-end-example-8.sh
2020-09-27 11:29:50 -04:00

15 lines
245 B
Bash

mlr put '
begin {
@num_total = 0;
@num_positive = 0;
};
@num_total += 1;
$x > 0.0 {
@num_positive += 1;
$y = log10($x); $z = sqrt($y)
};
end {
emitf @num_total, @num_positive
}
' data/put-gating-example-1.dkvp