Substrings in zsh
23 Mar 2023To get only parts of a specific string in zsh, you can use the ${var:start:stop}
syntax.
If stop
is omitted, it will cut until the end of the string. You can also pass negative values.
Want to add something ? Feel free to get in touch on Twitter : @pixelastic