Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: question about zargs
On Wed, Oct 31, 2012 at 02:25:46PM +0000, Peter Stephenson wrote:
> On Wed, 31 Oct 2012 21:40:07 +0800
> Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx> wrote:
> > I just learnt that there is a function 'zargs' which just like
> > 'xargs'. So why we need the 'zargs' as we have 'xargs' already?
> >
> > As a example, this works just fine with 'xargs':
> >
> > % print -N **/* | xargs -n1 -0 ls
>
> It works, but with more processes. zargs allows you to have things
> (though not ls) running completely in the shell. In that case, you
> aren't sensitive to the size of the argument list passed to an
> external
> process.
>
On Wed, Oct 31, 2012 at 09:30:17AM -0700, Bart Schaefer wrote:
> Preface for Han Pingtian: If the command you're going to run is external
> to the shell, then I recommend you use xargs. However, in some cases it
> may be desirable to get xargs-like behavior when passing arguments to a
> shell function or builtin, which is why there is zargs.
>
Thanks so much, Peter and Bart.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author