${(U)…}: Convert to uppercase

U converts all letters in the result to uppercase.

(L) is the opposite and converts to lowercase.

Examples

Convert array values to uppercase
1
2
declare data=(joe william jack averell)
echo "Dalton brothers: ${(U)data}"
Output:
1
Dalton brothers: JOE WILLIAM JACK AVERELL
BashSupport Pro is a Zsh IDE with support for ${(U)…}try it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal