W3cubDocs

/Nushell

length for filters

Count the number of items in an input list or rows in a table.

Signature

> length {flags}

Input/output types:

input output
list<any> int
table int

Examples

Count the number of items in a list

> [12345] |length
5

Count the number of rows in a table

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

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