From: "Lawrence Velázquez" <larryv@zsh.org>
To: "Zach Riggle" <zachriggle@gmail.com>,
"Bart Schaefer" <schaefer@brasslantern.com>
Cc: zsh-users@zsh.org
Subject: Re: Efficient way to map a list of values to multiple processes, then accumulate their output
Date: Sat, 06 Nov 2021 18:55:50 -0400 [thread overview]
Message-ID: <d26423b4-7089-438d-9292-788a8209f3af@www.fastmail.com> (raw)
In-Reply-To: <CAMP9c5=GjmYCbvwUOoj8HM6M2DFDOtf3m2_BpF2pqN+Fv6CWUw@mail.gmail.com>
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
next prev parent reply other threads:[~2021-11-06 22:57 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 [this message]
2021-11-08 20:27 ` Zach Riggle
2021-11-08 20:45 ` Zach Riggle
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=d26423b4-7089-438d-9292-788a8209f3af@www.fastmail.com \
--to=larryv@zsh.org \
--cc=schaefer@brasslantern.com \
--cc=zachriggle@gmail.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).