${(c)…}: Number of characters in array
${(c)#array} counts the characters in an array as if the elements were joined with a space.
Links
Examples
- Print characters of joined array
- Output:
1 2values=(a b c) echo ${(c)#values}15
BashSupport Pro 是一款支持 c** 的 **Zsh 集成开发环境 - 立即试用!