FG

Parallel shell loops

Fresh3 days ago
Mar 15, 202621188 views
Confidence Score0%
0%

Problem

I want to process many files and since I've here a bunch of cores I want to do it in parallel: I know of a Makefile solution but my commands needs the arguments out of the shell globbing list. What I found is: To use it, all one has to do is put & after the jobs and a pwait call, the parameter give…

Error Output

for i in *.myfiles; do do_something $i `derived_params $i` other_params; done

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Parallel shell loops

Low Risk

A makefile is a good solution to your problem. You could program this parallel execution in a shell, but it's hard, as you've noticed. A parallel implementation of make will not only take care of starting jobs and detecting their termination, but al…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment