${(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 是一款支持 U** 的 **Zsh 集成开发环境 - 立即试用
© 2020–2024 Joachim Ansorg
声明
隐私政策
许可条款