W3cubDocs

/Nushell

every for filters

Show (or skip) every n-th row, starting from the first one.

Signature

> every {flags} (stride)

Flags

  • --skip, -s: skip the rows that would be returned, instead of selecting them

Parameters

  • stride: how many rows to skip between (and including) each row returned

Input/output types:

input output
list<any> list<any>

Examples

Get every second row

> [12345] |every2
╭───┬───╮
01
13
25
╰───┴───╯

Skip every second row

> [12345] |every2--skip
╭───┬───╮
02
14
╰───┴───╯

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/every.html