From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4858 invoked by alias); 22 Oct 2013 17:24:45 -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: 18046 Received: (qmail 11231 invoked from network); 22 Oct 2013 17:24:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) 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 autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=JeD0AkJRdDEUoK4+9IDaB2HsHadSR9gZIuqy0uyEoQw=; b=vCRpyid0JHurH+veBh+IuJyi0dw04R+8j1W3kBoGa56cwvsKuX5AbNSvqyIu0HbcHV xtYQLvoW1gwsjjqRJYB8LzDoKtAwMp9a7cQN2gdq2XAfaE+mc4f8T59blfExlKAMD+UC NpiZ9zIbHl1eWYJjuVHv0+BEwB4+kxHxhTbstWwFuUBoDh1YJjGnLrRHYJv6v8fhfXxQ ahvkdw2jZqKankp8AkUyzioY7crdbOgBdUc+ytt73+eUShOF4cJyK31y+LSTV8s3/CpQ /ycWZ3V5cMH/FMVm+HhAg4aRzriQTjy/QGI566mmEY+w1ApKauShH+vLzAdO3DoqQlYo TLAQ== X-Received: by 10.194.119.106 with SMTP id kt10mr2580659wjb.72.1382461099962; Tue, 22 Oct 2013 09:58:19 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: =?UTF-8?B?SsOpcsOpbWllIFJvcXVldA==?= Date: Tue, 22 Oct 2013 18:58:04 +0200 Message-ID: Subject: Re: Glob problem To: Brent Briggs Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, 2013/10/22 Brent Briggs : > I am simply trying to list all matches for a specified pattern in an arra= y of directory paths, the $path array for example. Here is my attempt. Wher= e am I going wrong? > > pattern=3Dgit* > for entry in $path > do > # Print all files in the path that match the pattern. > print $entry/$pattern > done Filename expansion is not done when patterns are stored in variables. You have to force it using the $~var syntax. Try this: print $entry/$~pattern Best regards, --=20 J=C3=A9r=C3=A9mie