${(v)…}
: Show array values
v
used with k
show both key and value of an associative array: ${kv}array
.
Links
Examples
- Show key and values of an associative array
- Output:
1 2
declare -A data=([4]=joe [3]=william [2]=jack [1]=averell) echo "Dalton brothers: ${(kvo)data}"
1
Dalton brothers: 3 william 4 joe 1 averell 2 jack
BashSupport Pro 是一款支持 v** 的 **Zsh 集成开发环境 - 立即试用!