zsh-users
 help / color / mirror / code / Atom feed
From: "Eric Mangold" <teratorn@world-net.net>
To: "sam reckoner" <sam.reckoner@gmail.com>,
	"Mikael Magnusson" <mikachu@gmail.com>
Cc: zsh-users@sunsite.dk
Subject: Re: arrays and spaces in file names?
Date: Fri, 26 May 2006 10:22:07 +1000	[thread overview]
Message-ID: <op.s94ty5iv6k1y1x@localhost.localdomain> (raw)
In-Reply-To: <6a42eec70605251432l75970104odf2cb4d32899a295@mail.gmail.com>

names=( **/*(.) )

-Eric Mangold

On Fri, 26 May 2006 07:32:13 +1000, sam reckoner <sam.reckoner@gmail.com>  
wrote:

> 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
>>



  reply	other threads:[~2006-05-26  0:22 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
2006-05-26  0:22     ` Eric Mangold [this message]
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=op.s94ty5iv6k1y1x@localhost.localdomain \
    --to=teratorn@world-net.net \
    --cc=mikachu@gmail.com \
    --cc=sam.reckoner@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).