Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 412 Bytes

slice.md

File metadata and controls

24 lines (14 loc) · 412 Bytes

string slice START END [STRING]

This command will return slice a string starting at START (inclusive) and finishing at END (exclusive).

Typical command line

    string slice 3 8 'one|two|three'

Would return |two|

Piping content

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

    echo 'one|two|three' | string -i - slice 3 8

Would return |two|