Skip to content

Instantly share code, notes, and snippets.

View bambam2174's full-sized avatar
🌴
On vacation && just making myself learn and/or deepen new sklills & knowledge..!

Sedat Kilinc bambam2174

🌴
On vacation && just making myself learn and/or deepen new sklills & knowledge..!
View GitHub Profile
@mattmc3
mattmc3 / split.zsh.md
Last active March 31, 2024 15:34
ZSH - split string into array

Example splitting string on slash character in ZSH.

$ str=part1/part2/part3
$ parts=(${(@s:/:)str})
$ echo $parts
part1 part2 part3
$ echo ${#parts[@]}
3