Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: recursive globbing, filename spaces and xargs
- X-seq: zsh-users 8392
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Philippe Troin <phil@xxxxxxxx>
- Subject: Re: recursive globbing, filename spaces and xargs
- Date: Tue, 18 Jan 2005 09:05:20 +0000
- Cc: William Scott <wgscott@xxxxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- In-reply-to: <87hdlf4jwa.fsf@xxxxxxxxxxxxxxxx>
- Mail-followup-to: Philippe Troin <phil@xxxxxxxx>, William Scott <wgscott@xxxxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.GSO.4.43.0501170710390.995-100000@xxxxxxxxxxxxxxxxx> <87hdlf4jwa.fsf@xxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author