3 ms·
Something like this should do the same thing, I think?: seq 0 3 | parallel "./ad-hoc-operation > out-{}.log" https://www.gnu.org/software/parallel/ https://ww
by brendyn 8y ago
Something like this should do the same thing, I think?:
seq 0 3 | parallel "./ad-hoc-operation > out-{}.log"
https://www.gnu.org/software/parallel/ https://www.gnu.org/software/parallel/
- CJefferson 8y agoWith longer expressions, I find the escaping gets tricky. Also gnu parallel has stupid licence problems and the author has told me I can't use it without paying him.
- barrkel 8y agoMight do. OTOH I often have a shell pipeline as the body of the loop, rely on glob expansion, etc. For ad-hoc parallelism of a simple command over lots of data, I tend to use xargs -n -P - since I use xargs for other things, I stick with it. Also, bash and xargs are available everywhere, on production servers as well as dev laptops. Anything that requires installing something has a big hurdle to overcome - this counts for fish too.