${(0)…}
: Split at null byte
0
splits word at the null byte.
Links
Examples
- Splitting a string into words at null bytes
- Output:
1 2
string=$'several words\0separated by\0null bytes' echo ${(0)string}
1
several words separated by null bytes
BashSupport Pro is a Zsh IDE with support for ${(0)…} – try it now!