From: "sam reckoner" <sam.reckoner@gmail.com>
To: "Mikael Magnusson" <mikachu@gmail.com>
Cc: zsh-users@sunsite.dk
Subject: Re: arrays and spaces in file names?
Date: Thu, 25 May 2006 14:32:13 -0700 [thread overview]
Message-ID: <6a42eec70605251432l75970104odf2cb4d32899a295@mail.gmail.com> (raw)
In-Reply-To: <237967ef0605250805w4a39eab5mcb1fcc4757d85465@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 641 bytes --]
I need the intermediate step of putting the filenames in an array for other
reasons.
Thanks!
On 5/25/06, Mikael Magnusson <mikachu@gmail.com> wrote:
>
> On 5/24/06, reckoner <sam.reckoner@gmail.com> wrote:
> > I want to do something like
> >
> > % names=(`find . -print`)
> >
> > and then something like
> >
> > % for i in names do;...;done
> >
> > The problem is that some of the filenames have spaces in them and the
> > array elements split on these spaces. I read the manpage and can't make
> > sense of what to do w/ this.
> >
> > Help?
>
> Try this,
> for i in **/*(.); do foo; bar; done
>
> > Thanks.
>
> --
> Mikael Magnusson
>
[-- Attachment #2: Type: text/html, Size: 1053 bytes --]
next prev parent reply other threads:[~2006-05-25 21:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-24 20:08 reckoner
2006-05-25 15:05 ` Mikael Magnusson
2006-05-25 15:10 ` Marc Chantreux
2006-05-25 16:56 ` Paul Ackersviller
2006-05-25 17:53 ` Paul Ackersviller
2006-05-25 21:32 ` sam reckoner [this message]
2006-05-26 0:22 ` Eric Mangold
2006-05-25 15:08 ` Marc Chantreux
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=6a42eec70605251432l75970104odf2cb4d32899a295@mail.gmail.com \
--to=sam.reckoner@gmail.com \
--cc=mikachu@gmail.com \
--cc=zsh-users@sunsite.dk \
/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).