From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11843 invoked from network); 2 Jun 2005 08:27:05 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 2 Jun 2005 08:27:05 -0000 Received: (qmail 11283 invoked from network); 2 Jun 2005 08:26:58 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Jun 2005 08:26:58 -0000 Received: (qmail 18577 invoked by alias); 2 Jun 2005 08:26:51 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8938 Received: (qmail 18563 invoked from network); 2 Jun 2005 08:26:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 2 Jun 2005 08:26:50 -0000 Received: (qmail 10191 invoked from network); 2 Jun 2005 08:26:50 -0000 Received: from usintout02.bms.com (HELO mochilla.bms.com) (165.89.129.232) by a.mx.sunsite.dk with SMTP; 2 Jun 2005 08:26:46 -0000 Received: from mejpmsg01 ([127.0.0.1]) by mochilla.bms.com (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep 8 2003)) with ESMTP id <0IHG006JY7GIGB@mochilla.bms.com> for zsh-users@sunsite.dk; Thu, 02 Jun 2005 08:26:44 +0000 (GMT) Received: from ([198.155.96.17]) by meusintout02.net.bms.com (InterScan E-Mail VirusWall Unix); Thu, 02 Jun 2005 08:26:44 +0000 (GMT) Received: from [198.155.100.82] by mejpmsg01.net.bms.com (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep 8 2003)) with ESMTPA id <0IHG00AM07GHTE@mejpmsg01.net.bms.com> for zsh-users@sunsite.dk; Thu, 02 Jun 2005 08:26:41 +0000 (GMT) Content-return: prohibited Date: Thu, 02 Jun 2005 17:27:56 +0900 From: djh Subject: Re: selecting a subset of an array In-reply-to: <5D68F5D7-430A-44F5-A1A3-CB4690AB13CD@jota.gsc.riken.go.jp> To: zsh-users@sunsite.dk Message-id: <429EC30C.2070401@it.to-be.co.jp> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en, ja User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 References: <5D68F5D7-430A-44F5-A1A3-CB4690AB13CD@jota.gsc.riken.go.jp> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Kagawa-san, try using ${array-namae:#pattern} Here's the explanation I found in the manual. --> If the parameter is an ARRAY the matching array elements are removed. For the opposite effect use the `(M)' flag to remove the non-matched elements). Darel Henman -------------------- Wataru Kagawa wrote: > Sorry for another basic question, but how do I exclude a particular > element from an array by using its name in a parameter expansion? > For example, I would like to select everything except for > 'foo1:output file' from the following array, using only 'foo1' in the > expansion. > > _list=( 'foo1:output file' 'foo2:input file' 'foo3:output figs' > 'foo4:input figs' ) > > Help is much appreciated. > > Wataru Kagawa