parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there some syntax for executing {} for 1..Inf?


From: Ævar Arnfjörð Bjarmason
Subject: Is there some syntax for executing {} for 1..Inf?
Date: Thu, 7 Dec 2017 00:37:17 +0100

I recently had a use-case for:

    parallel 'cmd {}' ::: {1..Inf}

Well, I actually just ended up hardcoding Inf as a very large number.
The use-case is that I was using parallel to request N number of pages
from a paged API in parallel, but I didn't know what N would be in
advance.

An exit code and --halt soon,fail=1 ensured that I could get by N
number of pages from the API and halt as soon as I reached the last
one.

It would be nice if there was some syntax to do this without the hack
of supplying a huge list via the shell to parallel, but as far as I
can tell there isn't. If there's not consider this a feature request.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]