From: "Jérémie Roquet" <arkanosis@gmail.com>
To: Brent Briggs <brent.briggs@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Glob problem
Date: Tue, 22 Oct 2013 18:58:04 +0200 [thread overview]
Message-ID: <CAFOazAPt8QnFemQqqiWGg03i=rBuZ1-BmGxmrDEE2sANkc4U+A@mail.gmail.com> (raw)
In-Reply-To: <F814E825-D3A5-420E-B289-6D3B0FB47D75@gmail.com>
Hi,
2013/10/22 Brent Briggs <brent.briggs@gmail.com>:
> I am simply trying to list all matches for a specified pattern in an array of directory paths, the $path array for example. Here is my attempt. Where am I going wrong?
>
> pattern=git*
> 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,
--
Jérémie
next prev parent reply other threads:[~2013-10-22 17:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 16:45 Brent Briggs
2013-10-22 16:58 ` Jérémie Roquet [this message]
2013-10-22 16:59 ` Peter Stephenson
2013-10-22 17:05 ` Philippe Troin
2013-10-22 18:02 ` Brent Briggs
2013-10-22 18:12 ` Peter Miller
2013-10-22 18:49 ` Brent Briggs
2013-10-22 19:30 ` Peter Miller
2013-10-22 20:11 ` Yuya Amemiya
2013-10-23 12:27 ` Brent Briggs
2013-10-23 12:37 ` Jérémie Roquet
2013-10-23 13:47 ` Peter Stephenson
2013-10-23 14:29 ` Yuya Amemiya
2013-10-22 17:11 ` Matt Garriott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFOazAPt8QnFemQqqiWGg03i=rBuZ1-BmGxmrDEE2sANkc4U+A@mail.gmail.com' \
--to=arkanosis@gmail.com \
--cc=brent.briggs@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).