mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 18:25:45 +00:00
13 lines
170 B
Text
13 lines
170 B
Text
begin {
|
|
@count_of_red = 0;
|
|
@sum_of_red = 0
|
|
}
|
|
|
|
if ($color == "red") {
|
|
@count_of_red += 1;
|
|
@sum_of_red += $quantity;
|
|
}
|
|
|
|
end {
|
|
emit (@count_of_red, @sum_of_red)
|
|
}
|