From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 760 invoked by alias); 16 Oct 2012 23:05:26 -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: 17326 Received: (qmail 23345 invoked from network); 16 Oct 2012 23:05:24 -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=-4.2 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at skepticism.us does not designate permitted sender hosts) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=nGaQWPdDnQ4lpByV+n/PfpzpBpUCqqKYMU9IH4Na9AM=; b=Us5hWLxvSwVhid5Edp059CBSQ27rpKnYQcn6G5n/sIsZ8BuKKMhMc/mpQMd6w42t4Q XSv/A5JXWzZywQun1kbCwenn1yTm5HpwNBkVKITQEMsWwjrYs9mtba/2YVyFFh1Q5dWZ oF2rHCBhPSAAIqkdfLoBmZ+f6TTBKIzetyI/dK0FAkCXsiQcFT6j+OB8IrYbRA8H/Ncm Vfj+5DHuQEjkmMnirYVQmyWDuHxtaQn6ZNSUvgdEDSc8uX+WyMyNFWm/lX4s6CdjvXpD 7vXFOeLKORNui6As48EjQK4tkM/de5l3Y3R3SdNyw+nBHcWCDchwRDL5vTuQDcFtfsza NhGw== MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 16 Oct 2012 16:05:19 -0700 Message-ID: Subject: Re: set variable to output and immediately lowercase it? From: Kurtis Rader To: TJ Luoma Cc: Zsh-Users List Content-Type: multipart/alternative; boundary=20cf300512b22092e304cc35301b X-Gm-Message-State: ALoCoQk7ECFiDW+L/yfQ7DGrkcmczecIPbIRROQ8JsKe7hdP9Kfd3G4igd6skI3pb5VWBUIIWfYo4tvVNLdrsKYVinjv3oQJUgD+aM1k+1cqD8ndIkZxy6Y+PLk6+6HoLRiyq4Y/IDl9F5tkzl3/MMdPld6nF2podg== --20cf300512b22092e304cc35301b Content-Type: text/plain; charset=UTF-8 typeset -l FOO="$(echo HeLlo WoRlD)" or more typically typeset -l FOO FOO=$(echo HeLlo WoRlD) On Tue, Oct 16, 2012 at 3:42 PM, TJ Luoma wrote: > 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 > -- Kurtis Rader Caretake of the exceptional canines Junior and Chino --20cf300512b22092e304cc35301b--