detect columns
for strings
Attempt to automatically split text into multiple columns.
Signature
> detect columns --skip --no-headers
Parameters
--skip {int}
: number of rows to skip before detecting--no-headers
(-n)
: don't detect headers
Examples
Splits string across multiple columns
> 'a b c' | detect columns -n
╭───┬─────────┬─────────┬─────────╮
│ # │ column0 │ column1 │ column2 │
├───┼─────────┼─────────┼─────────┤
│ 0 │ a │ b │ c │
╰───┴─────────┴─────────┴─────────╯
Splits a multi-line string into columns with headers detected
> $'c1 c2 c3(char nl)a b c' | detect columns