lines

For filters.

Converts input to lines.

Command Type

built-in

Signature

> lines {flags}

Flags

  • --skip-empty, -s: Skip empty lines.
  • --strict: Validate UTF-8 strictly.

Input/output types:

input output
any list<string>

Examples

Split multi-line string into lines

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

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.