from ssv

For formats.

Parse text as space-separated values and create a table. The default minimum number of spaces counted as a separator is 2.

Command Type

built-in

Signature

> from ssv {flags}

Flags

  • --noheaders, -n: Don’t treat the first row as column names.
  • --aligned-columns, -a: Assume columns are aligned.
  • --minimum-spaces, -m {int}: The minimum spaces to separate columns.

Input/output types:

input output
string table

Examples

Converts ssv formatted string to table.

> 'FOO   BAR
1   2' | from ssv
╭───┬─────┬─────╮
│ # │ FOO │ BAR │
├───┼─────┼─────┤
│ 0 │ 1   │ 2   │
╰───┴─────┴─────╯

Converts ssv formatted string to table but not treating the first row as column names.

> 'FOO   BAR
1   2' | from ssv --noheaders
╭───┬─────────┬─────────╮
│ # │ column0 │ column1 │
├───┼─────────┼─────────┤
│ 0 │ FOO     │ BAR     │
│ 1 │ 1       │ 2       │
╰───┴─────────┴─────────╯

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