nushell/docs/commands/each_group.md
JT 8c0a2d3c15
Auto-generate markdown command docs (#4451)
* Finish updating

* a couple improvements

* Update renames

* cleanup examples
2022-02-13 21:22:51 -05:00

385 B

title layout version
each group command 0.59.0

Runs a block on groups of group_size rows of a table at a time.

Signature

> each group (group_size) (block)

Parameters

  • group_size: the size of each group
  • block: the block to run on each group

Examples

Echo the sum of each pair

> echo [1 2 3 4] | each group 2 { $it.0 + $it.1 }