${(U)…}: Convert to uppercase
U converts all letters in the result to uppercase.
(L) is the opposite and converts to lowercase.
Links
Examples
- Convert array values to uppercase
- Output:
1 2declare data=(joe william jack averell) echo "Dalton brothers: ${(U)data}"1Dalton brothers: JOE WILLIAM JACK AVERELL
BashSupport Pro is a Zsh IDE with support for ${(U)…} – try it now!