From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10601 invoked by alias); 17 Oct 2012 00:31:07 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17327 Received: (qmail 24373 invoked from network); 17 Oct 2012 00:31:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Wed, 17 Oct 2012 11:31:06 +1100 From: Geoff Wing To: Zsh-Users List Subject: Re: set variable to output and immediately lowercase it? Message-ID: <20121017003106.GA7448@primenet.com.au> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: PrimeNet Computer Consultancy User-Agent: Mutt/1.5.21 (2010-09-15) 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