${(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 是一款支持 U** 的 **Zsh 集成开发环境 - 立即试用!