${(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 is a Zsh IDE with support for ${(c)…} – try it now!