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.

Signature

> from ssv --noheaders --aligned-columns --minimum-spaces

Parameters

  • --noheaders (-n): don't treat the first row as column names
  • --aligned-columns (-a): assume columns are aligned
  • --minimum-spaces {int}: the minimum spaces to separate columns

Input/output types:

inputoutput
stringtable

Examples

Converts ssv formatted string to table

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

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

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