${(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 is a Zsh IDE with support for ${(L)…}try it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal