From: Stephane Chazelas <Stephane_Chazelas@yahoo.fr>
To: Philippe Troin <phil@fifi.org>
Cc: William Scott <wgscott@chemistry.ucsc.edu>, zsh-users@sunsite.dk
Subject: Re: recursive globbing, filename spaces and xargs
Date: Tue, 18 Jan 2005 09:05:20 +0000 [thread overview]
Message-ID: <20050118090520.GB4820@sc> (raw)
In-Reply-To: <87hdlf4jwa.fsf@ceramic.fifi.org>
On Mon, Jan 17, 2005 at 05:15:49PM -0800, Philippe Troin wrote:
[...]
> > echo **/* | xargs ls
> >
> > but if there are spaces, it fails, and I can't seem to figure
> > out how to quote or escape the spaces.
> >
> > Any suggestions, or should I stick to find?
>
> print -N **/* | xargs -0 ....
That would still fail for filenames with backslashes or starting
with "-".
print -rN -- **/* | xargs -r0 ls -d --
Or
autoload -U zargs
zargs ./**/* -- ls -d
--
Stéphane
prev parent reply other threads:[~2005-01-18 9:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-17 15:14 William Scott
2005-01-18 0:49 ` Bart Schaefer
2005-01-18 0:51 ` Christian Schneider
2005-01-18 1:15 ` Philippe Troin
2005-01-18 2:06 ` William Scott
2005-01-18 9:05 ` Stephane Chazelas [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=20050118090520.GB4820@sc \
--to=stephane_chazelas@yahoo.fr \
--cc=phil@fifi.org \
--cc=wgscott@chemistry.ucsc.edu \
--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).