From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10514 invoked by alias); 22 Sep 2011 06:47:19 -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: 16392 Received: (qmail 10662 invoked from network); 22 Sep 2011 06:47:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.83.41 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:user-agent:mime-version :content-type; bh=dqNN/gNhVKH4BEGHy3J76vyhKGV86mUthFdZ2Hx0LCA=; b=TaO0XTfn6Nh/4/CQy50cmyT6UME0PaLJmwn3yYssnh083QVZbNH7bCNa65cpR8DLlQ W9H8jLPRaG+pgyh6ABhnIx10FRDU3AKLF4C9yEPWB4aRbjUrlXJK0iOnRLmraFRg/iuw i/5y7BJDxIgseqYRfPRd1+OkkrMG09QIeAutc= Date: Thu, 22 Sep 2011 01:46:20 -0500 (CDT) From: Rory Mulvaney To: zsh-users@zsh.org Subject: using parameter expansion sorting flags Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hello, I have a few filenames that I put into an array with: PNMFILES=( f.*.{Atop,Bbot}.pnm ) the ordered contents of this array become: f.0009.Atop.pnm f.0010.Atop.pnm f.0011.Atop.pnm f.0012.Atop.pnm f.0009.Bbot.pnm f.0010.Bbot.pnm f.0011.Bbot.pnm Now I can't figure out how to order them in an array, using the parameter expansion sorting flags n and o, as: f.0009.Atop.pnm f.0009.Bbot.pnm f.0010.Atop.pnm f.0010.Bbot.pnm f.0011.Atop.pnm f.0011.Bbot.pnm f.0012.Atop.pnm Also I'd like the resulting resorted array PNMFILES2 to be such that: echo ${PNMFILES2[2]} yields: f.0009.Bbot.pnm rather than some single character. Thanks and regards again, Rory