From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3234 invoked from network); 26 Jul 2005 01:56:29 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Jul 2005 01:56:29 -0000 Received: (qmail 19934 invoked from network); 26 Jul 2005 01:56:24 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Jul 2005 01:56:24 -0000 Received: (qmail 2628 invoked by alias); 26 Jul 2005 01:56:15 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9179 Received: (qmail 2618 invoked from network); 26 Jul 2005 01:56:14 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Jul 2005 01:56:14 -0000 Received: (qmail 18840 invoked from network); 26 Jul 2005 01:56:14 -0000 Received: from ykdmp01.yokohama.riken.go.jp (134.160.82.30) by a.mx.sunsite.dk with SMTP; 26 Jul 2005 01:56:10 -0000 Received: (qmail 29190 invoked by uid 0); 26 Jul 2005 10:56:07 +0900 Received: from unknown (HELO jota.gsc.riken.go.jp) (127.0.0.1) by 0 with SMTP; 26 Jul 2005 10:56:07 +0900 Received: from ([jota.gsc.riken.go.jp (134.160.84.23)]) by ykdmp01 (InterScan E-Mail VirusWall Unix); Tue, 26 Jul 2005 10:56:07 +0900 (JST) Received: from [10.64.67.139] (ipm04.gsc.riken.go.jp [134.160.83.74]) by jota.gsc.riken.go.jp (Postfix) with ESMTP id 1B42734854DF; Tue, 26 Jul 2005 10:56:06 +0900 (JST) In-Reply-To: <10C0AB35-42EC-4270-8CC0-8ABDA5428A83@h8.dion.ne.jp> References: <1050724093315.ZM20733@candle.brasslantern.com> <3BF4526D-BFA6-46C7-A977-BD43DFAD4C07@jota.gsc.riken.go.jp> <10C0AB35-42EC-4270-8CC0-8ABDA5428A83@h8.dion.ne.jp> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: multipart/alternative; boundary=Apple-Mail-1-154361924 Message-Id: Cc: Motoi Washida From: Wataru Kagawa Subject: Re: outputs of _users and _hosts to arrays Date: Tue, 26 Jul 2005 10:56:06 +0900 To: zsh-users@sunsite.dk X-Mailer: Apple Mail (2.733) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE autolearn=ham version=3.0.4 --Apple-Mail-1-154361924 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi Motoi, Thanks much for the help. > Load zsh/parameter module, > > % zmodload -i zsh/parameter > > and, > > % users=( $userdirs[(I)*] ) This works nicely. >> hosts=( ${$( cat /etc/hosts | cut -d : -f 1,7 | grep -v "#" )//:*/} ) >> >> to get what I need. >> > This has the same problem, but I don't know a better way well. > Using some functions from Perl or some other language? Do you mean that the commands inside the parameter expansion may work on Mac OS X but not on other computers? --Apple-Mail-1-154361924 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=US-ASCII Hi Motoi,

Thanks much for the = help.

Load= zsh/parameter module,

% zmodload -i = zsh/parameter

and,

% = users=3D( $userdirs[(I)*] )

This works = nicely.

hosts=3D( ${$( cat = /etc/hosts | cut -d : -f 1,7 | grep -v "#" )//:*/} = )

to get what I need.
=
This has the same problem, but I don't know a = better way well. Using some functions from Perl or some other = language?

Do you mean that the = commands inside the parameter expansion may work on Mac OS X but not on = other computers?
= --Apple-Mail-1-154361924--