Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: arrays and spaces in file names?
- X-seq: zsh-users 10309
- From: "sam reckoner" <sam.reckoner@xxxxxxxxx>
- To: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- Subject: Re: arrays and spaces in file names?
- Date: Thu, 25 May 2006 14:32:13 -0700
- Cc: zsh-users@xxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=QsIhH3NrwxlaoAIyDwh38jWVUhWNRZXxG1gVnMFMiTbpJEknzIQl/hV4DrdDblJXz0rGawS97TWsiTZ0Fc9094hbAoGJYAnHJBJvShOzNtpNs1hEtNghQmvsRivEntMT/kQuw7zm4jz9pD55pCYaaTLC20FmIn/bgP5fRgaGbgk=
- In-reply-to: <237967ef0605250805w4a39eab5mcb1fcc4757d85465@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <4474BD59.9030508@xxxxxxxxx> <237967ef0605250805w4a39eab5mcb1fcc4757d85465@xxxxxxxxxxxxxx>
I need the intermediate step of putting the filenames in an array for other reasons.
Thanks!
On 5/25/06, Mikael Magnusson <
mikachu@xxxxxxxxx> wrote:On 5/24/06, reckoner <
sam.reckoner@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author