From: Marc Chantreux <marc.chantreux@ulpmm.u-strasbg.fr>
To: zsh-users@sunsite.dk
Subject: Re: arrays and spaces in file names?
Date: Thu, 25 May 2006 17:08:02 +0200 [thread overview]
Message-ID: <4475C852.1070807@ulpmm.u-strasbg.fr> (raw)
In-Reply-To: <4474BD59.9030508@gmail.com>
reckoner a écrit :
> I want to do something like
>
> % names=(`find . -print`)
the result is splitted with IFS. If you want each lines to be an element
if your array, use (f) flag.
names=(${(f)"$(find . -print)"})
for f ( $names ) print $f
OT but can help : you don't need find as ** can search files recursively :
names=( **/* ) and names=(${(f)"$(find . -print)"}) are equivalent
regards
mc
prev parent reply other threads:[~2006-05-25 15:07 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
2006-05-25 15:08 ` Marc Chantreux [this message]
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=4475C852.1070807@ulpmm.u-strasbg.fr \
--to=marc.chantreux@ulpmm.u-strasbg.fr \
--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).