Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: selecting a subset of an array
- X-seq: zsh-users 8938
- From: djh <henman@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: selecting a subset of an array
- Date: Thu, 02 Jun 2005 17:27:56 +0900
- In-reply-to: <5D68F5D7-430A-44F5-A1A3-CB4690AB13CD@xxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <5D68F5D7-430A-44F5-A1A3-CB4690AB13CD@xxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author