Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
set variable to output and immediately lowercase it?
- X-seq: zsh-users 17325
- From: TJ Luoma <luomat@xxxxxxxxx>
- To: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: set variable to output and immediately lowercase it?
- Date: Tue, 16 Oct 2012 18:42:07 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=q59pm1R0R3c9eQH75KdOzZmKYVJAiGUWEs89T4+2dYo=; b=zxQxmw01szBSNgG5zO1L2Xf22cQXD04F3n3esC4B2II1InYTEw1qAkoUebvrdV1mXP 4aa7KFdvP48TmlbhyBq5jukDz/MLJZELXSOBQcU0UXnx4NGkc8yUiOjmE9zD6kvRCCg1 JOfhIDC/rzFCJfllaCy/XgWDpodL0JMT2tosl8CPvLQar8Qu1WChGzo6iIBEAq4xeSTP QyEnT2Be6fryG36mv5IwTSv8cg0+vNq6gopamq6IlrlATWaU5yuN89LcBtnGivQzTRdM RJEahfCQ5YkezClVoOQPD/OM46Y5V8gHoyAZ0+GvSMiOcO11msOa4sZZmGEksC5zychI 0iMA==
- 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
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