zsh-users
 help / color / mirror / code / Atom feed
* set variable to output and immediately lowercase it?
@ 2012-10-16 22:42 TJ Luoma
  2012-10-16 23:05 ` Kurtis Rader
  2012-10-17  0:31 ` Geoff Wing
  0 siblings, 2 replies; 4+ messages in thread
From: TJ Luoma @ 2012-10-16 22:42 UTC (permalink / raw)
  To: Zsh-Users List

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-17  2:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-16 22:42 set variable to output and immediately lowercase it? TJ Luoma
2012-10-16 23:05 ` Kurtis Rader
2012-10-17  0:31 ` Geoff Wing
2012-10-17  2:28   ` TJ Luoma

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).