2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
title: length
|
|
|
|
layout: command
|
|
|
|
version: 0.59.0
|
|
|
|
---
|
2019-11-10 08:42:59 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Count the number of elements in the input.
|
2020-08-15 05:36:15 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Signature
|
2020-08-15 05:36:15 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
```> length --column```
|
2019-11-10 08:42:59 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Parameters
|
2019-11-10 08:42:59 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
- `--column`: Show the number of columns in a table
|
2020-06-23 18:21:47 +00:00
|
|
|
|
2022-02-20 01:13:33 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Count the number of entries in a list
|
|
|
|
```shell
|
|
|
|
> echo [1 2 3 4 5] | length
|
|
|
|
```
|
|
|
|
|
|
|
|
Count the number of columns in the calendar table
|
|
|
|
```shell
|
|
|
|
> cal | length -c
|
|
|
|
```
|