nushell/docs/commands/range.md
JT 8c0a2d3c15
Auto-generate markdown command docs (#4451)
* Finish updating

* a couple improvements

* Update renames

* cleanup examples
2022-02-13 21:22:51 -05:00

34 lines
420 B
Markdown

---
title: range
layout: command
version: 0.59.0
---
Return only the selected rows.
## Signature
```> range (rows)```
## Parameters
- `rows`: range of rows to return: Eg) 4..7 (=> from 4 to 7)
## Examples
Get the last 2 items
```shell
> [0,1,2,3,4,5] | range 4..5
```
Get the last 2 items
```shell
> [0,1,2,3,4,5] | range (-2)..
```
Get the next to last 2 items
```shell
> [0,1,2,3,4,5] | range (-3)..-2
```