${(L)…}: Convert to lowercase

(L) converts all letters of the result to lowercase.

(U) is the opposite and converts to uppercase.

Examples

Convert array values to lowercase
1
2
declare data=(JOE WILLIAM JACK AVERELL)
echo "Dalton brothers: ${(L)data}"
Output:
1
Dalton brothers: joe william jack averell
BashSupport Pro 是一款支持 L** 的 **Zsh 集成开发环境 - 立即试用
© 2020–2024 Joachim Ansorg
声明
隐私政策
许可条款