zsh-users
 help / color / mirror / code / Atom feed
From: Zach Riggle <zachriggle@gmail.com>
To: "Lawrence Velázquez" <larryv@zsh.org>
Cc: Bart Schaefer <schaefer@brasslantern.com>, Zsh Users <zsh-users@zsh.org>
Subject: Re: Efficient way to map a list of values to multiple processes, then accumulate their output
Date: Mon, 8 Nov 2021 14:45:56 -0600	[thread overview]
Message-ID: <CAMP9c5k3E2wuQkgiuhqjYUQvFrmxF7qbCfVeARL4wm=eTPh+1A@mail.gmail.com> (raw)
In-Reply-To: <CAMP9c5kO1HXRa+hqMP9BOcds0T9N2Z6zwR5Lxc_mNSEHifVOoA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1470 bytes --]

And after going to change my test script, I actually grokked what you were
suggesting :)

*Zach Riggle*


On Mon, Nov 8, 2021 at 2:27 PM Zach Riggle <zachriggle@gmail.com> wrote:

> Ah-ha! Okay!  I took "works exactly like xargs" a little too literally and
> didn't read the docs closely enough.
>
> As always, thanks for your help guys!
>
> *Zach Riggle*
>
>
> On Sat, Nov 6, 2021 at 5:56 PM Lawrence Velázquez <larryv@zsh.org> wrote:
>
>> On Sat, Nov 6, 2021, at 5:58 PM, Zach Riggle wrote:
>> > A very simple test works exactly correct, but a slight variation gives
>> > me "zargs: argument list too long":
>>
>> From your gist:
>>
>> > # Works
>> > zargs -P12 -n1 -- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 --
>> wrapper1
>>
>> > # Does not work --> zrgs: argument list too long
>> > zargs -P12 -n1 -- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 --
>> wrapper2 double
>>
>> From zshcontrib(1):
>>
>>     zargs [ option ... -- ] [ input ... ] [ -- command [ arg ... ] ]
>>
>>         [...]
>>
>>         The options -i, -I, -l, -L, and -n differ slightly from their
>>         usage in `xargs`.  There are no input lines for `zargs` to
>>         count, so -l and -L count through the "input" list, and -n
>>         counts the number of arguments passed to each execution of
>>         "command", *including* any "arg" list.
>>
>> So you actually want -n2.  (Adjust to taste.)
>>
>> --
>> vq
>>
>

[-- Attachment #2: Type: text/html, Size: 2480 bytes --]

      reply	other threads:[~2021-11-08 20:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-06 13:40 Zach Riggle
2021-11-06 16:18 ` Bart Schaefer
2021-11-06 21:58   ` Zach Riggle
2021-11-06 22:55     ` Lawrence Velázquez
2021-11-08 20:27       ` Zach Riggle
2021-11-08 20:45         ` Zach Riggle [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='CAMP9c5k3E2wuQkgiuhqjYUQvFrmxF7qbCfVeARL4wm=eTPh+1A@mail.gmail.com' \
    --to=zachriggle@gmail.com \
    --cc=larryv@zsh.org \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /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).