2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: length
|
|
|
|
layout: command
|
2022-03-04 13:10:09 +01:00
|
|
|
version: 0.59.1
|
2022-02-14 03:22:51 +01:00
|
|
|
---
|
2019-11-10 09:42:59 +01:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Count the number of elements in the input.
|
2020-08-15 07:36:15 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
## Signature
|
2020-08-15 07:36:15 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
```> length --column```
|
2019-11-10 09:42:59 +01:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
## Parameters
|
2019-11-10 09:42:59 +01:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
- `--column`: Show the number of columns in a table
|
2020-06-23 20:21:47 +02:00
|
|
|
|
2022-02-20 02:13:33 +01: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
|
|
|
|
```
|