help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] parallel processing in bash (to replace for loop)


From: Greg Wooledge
Subject: Re: [Help-bash] parallel processing in bash (to replace for loop)
Date: Fri, 27 Jan 2012 08:28:20 -0500
User-agent: Mutt/1.4.2.3i

On Thu, Jan 26, 2012 at 09:57:59PM -0600, Peng Yu wrote:
> I have see a number of ways to parallelize for loop. However, none of
> the methods is syntactically clean and easy (as I would want, maybe
> they are good enough for others) to use with bash. I'm wondering what
> is the best practice to parallelize a for loop in bash as of now.

for i in {1..5}; do
  foobar "$i" &
done
wait

See also http://mywiki.wooledge.org/ProcessManagement



reply via email to

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