nushell/docs/commands/keep.md
Justin Ma c0a1d18e3d
update #4455, regenerate commands' docs and update make_docs script (#4586)
* feat: update #4455, regenerate commands' docs

* chore: update make_docs script
2022-02-21 11:26:00 -06:00

27 lines
336 B
Markdown

---
title: keep
layout: command
version: 0.59.0
---
Keep the first n elements of the input.
## Signature
```> keep (n)```
## Parameters
- `n`: the number of elements to keep
## Examples
Keep two elements
```shell
> echo [[editions]; [2015] [2018] [2021]] | keep 2
```
Keep the first value
```shell
> echo [2 4 6 8] | keep
```