Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

set variable to output and immediately lowercase it?



Is there a (reasonably sane) way to combine these into one line:

	FOO=$(echo HeLlo WoRlD)

	FOO="${FOO:l}"

I mean, I know I could do this:

	FOO=$(echo HeLlo WoRlD | tr '[:upper:]' '[:lower:]')

but I mean is it possible to do this all in zsh.


I tried

	FOO=$(echo HeLlo WoRlD):l

and

	FOO=($(echo HeLlo WoRlD):l)

but they don't work, it just adds ":l" to the end of the variable.

TjL



Messages sorted by: Reverse Date, Date, Thread, Author