path split
for default
Split a path into a list based on the system's path separator.
Signature
> path split --columns
Parameters
--columns {table}
: For a record or table input, split strings at the given columns
Examples
Split a path into parts
> '/home/viking/spam.txt' | path split
╭───┬──────────╮
│ 0 │ / │
│ 1 │ home │
│ 2 │ viking │
│ 3 │ spam.txt │
╰───┴──────────╯
Split all paths under the 'name' column
> ls ('.' | path expand) | path split -c [ name ]