Skip to content

Files

Latest commit

 

History

History
24 lines (14 loc) · 428 Bytes

split.md

File metadata and controls

24 lines (14 loc) · 428 Bytes

string split DELIMITER [STRING]

This command will return split a string at the delimiter and return it as a JSON array.

Typical command line

    string split '|' 'one|two|three'

Would return ["one","two","three"]

Piping content

NOTE: To read content from standard input we use the -i - option.

    echo 'one|two|three' | string -i - split '|'

Would return ["one","two","three"]