From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12476 invoked from network); 2 Jul 2003 17:24:23 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 2 Jul 2003 17:24:23 -0000 Received: (qmail 14158 invoked by alias); 2 Jul 2003 17:24:11 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6341 Received: (qmail 14151 invoked from network); 2 Jul 2003 17:24:11 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 2 Jul 2003 17:24:11 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.183.235] by sunsite.dk (MessageWall 1.0.8) with SMTP; 2 Jul 2003 17:24:11 -0000 Received: from EXCHANGE02.csr.com (unverified) by MAILSWEEPER01.cambridgesiliconradio.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Tue, 1 Jul 2003 18:23:44 +0100 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.5329); Wed, 2 Jul 2003 18:23:27 +0100 To: zsh-users@sunsite.dk Subject: Re: Parameter expansion only to existing filenames In-reply-to: "Vin Shelton"'s message of "Wed, 02 Jul 2003 13:18:55 EDT." <545n0fwvocg.fsf@icd.teradyne.com> Date: Wed, 02 Jul 2003 18:24:09 +0100 Message-ID: <27848.1057166649@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 02 Jul 2003 17:23:27.0902 (UTC) FILETIME=[A69173E0:01C340BE] Vin Shelton wrote: > I was recently re-reading the Zsh User Guide (Thanks, Peter!!) and I > started a few experiments. One need I have that is as yet unfulfilled > is to combine a list of directories and list of files such that only > the ones which exist get listed. Here's what I mean: > > zsh -f > denver% echo $ZSH_VERSION > 4.1.1 > denver% mkdir a b c > denver% touch a/x b/y c/z > denver% dirs=(a b c) > denver% files=(x y z) > denver% print $^dirs/$^files > a/x a/y a/z b/x b/y b/z c/x c/y c/z > > What I'd like to generate is: > a/x b/y c/z print $^dirs/$^files(N) -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************