Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: set variable to output and immediately lowercase it?
- X-seq: zsh-users 17327
- From: Geoff Wing <gcw@xxxxxxx>
- To: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: Re: set variable to output and immediately lowercase it?
- Date: Wed, 17 Oct 2012 11:31:06 +1100
- In-reply-to: <CADjGqHvY-2-geC3F+O7-72N=52m+Q6_0J92-vQxPiFh2ufYvdA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: PrimeNet Computer Consultancy
- References: <CADjGqHvY-2-geC3F+O7-72N=52m+Q6_0J92-vQxPiFh2ufYvdA@mail.gmail.com>
On Tuesday 2012-10-16 18:42 -0400, TJ Luoma output:
:Is there a (reasonably sane) way to combine these into one line:
: FOO=$(echo HeLlo WoRlD)
: FOO="${FOO:l}"
: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.
Try small `l' parameter modifier
FOO=${$(echo HeLlo WoRlD):l}
or capital `L' parameter expansion flag
FOO=${(L)$(echo HeLlo WoRlD)}
Regards,
Geoff
Messages sorted by:
Reverse Date,
Date,
Thread,
Author