Home Explore Blog CI



nushell

commands/docs/every.md
4c72283718354262738bd19472ec92c4b1a2d0c74c5d3bc1000000030000049c
---
title: every
categories: |
  filters
version: 0.104.0
filters: |
  Show (or skip) every n-th row, starting from the first one.
usage: |
  Show (or skip) every n-th row, starting from the first one.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `every` for [filters](/commands/categories/filters.md)

<div class='command-title'>Show (or skip) every n-th row, starting from the first one.</div>

## 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
```nu
> [1 2 3 4 5] | every 2
╭───┬───╮
│ 0 │ 1 │
│ 1 │ 3 │
│ 2 │ 5 │
╰───┴───╯

```

Skip every second row
```nu
> [1 2 3 4 5] | every 2 --skip
╭───┬───╮
│ 0 │ 2 │
│ 1 │ 4 │
╰───┴───╯

```

Chunks
908de9ce (1st chunk of `commands/docs/every.md`)
Title: every
Summary
The `every` command is a filter that shows or skips every n-th row from a list, starting from the first row. It takes a stride parameter to determine the interval between selected rows and a skip flag to invert the selection, skipping the rows that would normally be returned.