2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: every
|
|
|
|
layout: command
|
|
|
|
version: 0.59.0
|
|
|
|
---
|
2020-06-16 21:58:41 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Show (or skip) every n-th row, starting from the first one.
|
2020-06-16 21:58:41 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
## Signature
|
2020-06-16 21:58:41 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
```> every (stride) --skip```
|
2020-06-16 21:58:41 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
## Parameters
|
|
|
|
|
|
|
|
- `stride`: how many rows to skip between (and including) each row returned
|
|
|
|
- `--skip`: skip the rows that would be returned, instead of selecting them
|
2020-06-16 21:58:41 +02:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Get every second row
|
2020-06-16 21:58:41 +02:00
|
|
|
```shell
|
2022-02-14 03:22:51 +01:00
|
|
|
> [1 2 3 4 5] | every 2
|
2020-06-16 21:58:41 +02:00
|
|
|
```
|
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Skip every second row
|
2020-06-16 21:58:41 +02:00
|
|
|
```shell
|
2022-02-14 03:22:51 +01:00
|
|
|
> [1 2 3 4 5] | every 2 --skip
|
2020-06-16 21:58:41 +02:00
|
|
|
```
|