collect
for filters> collect {flags} (closure)
--keep-env, -
: let the block affect environment variablesclosure
: the closure to run once the stream is collectedinput | output |
---|---|
any | any |
Use the second value in the stream
> [123] |collect { |x| $x.1 }
2
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/collect.html