Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 180 Bytes

bash-string.md

File metadata and controls

17 lines (12 loc) · 180 Bytes

strings

slice

# first two chars
${foo::2}

# minus the first two chars
${foo:2}

# last two chars
${foo:${#foo}-2}

# minus the last two chars
${foo::${#foo}-2}