Spec-Zone.ru › Nushell

length for filters

Count the number of items in an input list, rows in a table, or bytes in binary data.

Signature

> length {flags}

Input/output types:

input output
list<any> int
binary int
nothing int
SQLiteQueryBuilder int

Examples

Count the number of items in a list

> [1 2 3 4 5] | length
5

Count the number of rows in a table

> [{a:1 b:2}, {a:2 b:3}] | length
2

Count the number of bytes in binary data

> 0x[01 02] | length
2

Count the length a null value

> null | length
0

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/length.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API