W3cubDocs

/Nushell

size for strings

Gather word count statistics on the text.

Signature

> size {flags}

Input/output types:

input output
string record

Examples

Count the number of words in a string

>"There are seven words in this sentence"|size
╭───────────┬────╮
lines1
words7
bytes38
chars38
graphemes38
╰───────────┴────╯

Counts unicode characters

>'今天天气真好'|size
╭───────────┬────╮
lines1
words6
bytes18
chars6
graphemes6
╰───────────┴────╯

Counts Unicode characters correctly in a string

>"Amélie Amelie"|size
╭───────────┬────╮
lines1
words2
bytes15
chars14
graphemes13
╰───────────┴────╯

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