2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: range
|
|
|
|
layout: command
|
2022-03-04 13:10:09 +01:00
|
|
|
version: 0.59.1
|
2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
|
2021-05-30 02:57:04 +02:00
|
|
|
Return only the selected rows.
|
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
## Signature
|
|
|
|
|
|
|
|
```> range (rows)```
|
2021-05-30 02:57:04 +02:00
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
- `rows`: range of rows to return: Eg) 4..7 (=> from 4 to 7)
|
2021-05-30 02:57:04 +02:00
|
|
|
|
|
|
|
## Examples
|
2022-02-14 03:22:51 +01:00
|
|
|
|
|
|
|
Get the last 2 items
|
|
|
|
```shell
|
|
|
|
> [0,1,2,3,4,5] | range 4..5
|
|
|
|
```
|
|
|
|
|
|
|
|
Get the last 2 items
|
2021-05-30 02:57:04 +02:00
|
|
|
```shell
|
2022-02-14 03:22:51 +01:00
|
|
|
> [0,1,2,3,4,5] | range (-2)..
|
|
|
|
```
|
2021-05-30 02:57:04 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Get the next to last 2 items
|
2021-05-30 02:57:04 +02:00
|
|
|
```shell
|
2022-02-14 03:22:51 +01:00
|
|
|
> [0,1,2,3,4,5] | range (-3)..-2
|
|
|
|
```
|