${(0)…}: Split at null byte

0 splits word at the null byte.

Examples

Splitting a string into words at null bytes
1
2
string=$'several words\0separated by\0null bytes'
echo ${(0)string}
Output:
1
several words separated by null bytes
BashSupport Pro 是一款支持 0** 的 **Zsh 集成开发环境 - 立即试用
© 2020–2024 Joachim Ansorg
声明
隐私政策
许可条款