W3cubDocs

/Nushell

lines for filters

Converts input to lines.

Signature

> lines {flags}

Flags

  • --skip-empty, -s: skip empty lines

Input/output types:

input output
any list<string>

Examples

Split multi-line string into lines

>$"two\nlines"|lines
╭───┬───────╮
0two
1lines
╰───┴───────╯

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