Home Explore Blog CI



nushell

1st chunk of `commands/docs/every.md`
908de9cec6680f5710ddb0af4e007a6ef86f214e7b47937d000000010000049c
---
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 │
╰───┴───╯

```

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.