From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <68ce90976b22bdb0929ccccafef4b7d0@kw.quanstro.net> <3330200.XJjoRb8JbZ@blitz> <5538fcd345a73fc294c6ee568f2fcdb4@kw.quanstro.net> <8ee568439e1855124564ecf0e83ac2b3@kw.quanstro.net> <6c7d84f203a2cc4f3427e177e34fa9d9@brasstown.quanstro.net> <323885878fa10ffb7824819d474970e3@brasstown.quanstro.net> From: Dan Cross Date: Thu, 30 Aug 2012 19:55:39 +0530 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] rc's shortcomings (new subject line) Topicbox-Message-UUID: b426c93a-ead7-11e9-9d60-3106f5b1d025 On Thu, Aug 30, 2012 at 7:51 PM, Dan Cross wrote: > A parallel apply sort of thing could be used with xargs, of course; > 'whatever | xargs papply foo' could keep some $n$ of foo's running at > the same time. The magic behind 'papply foo `{whatever}' is that it > knows how to interpret its arguments in blocks. xargs will invoke a > command after reading $n$ arguments, but that's mainly to keep from > overflowing the argument buffer, and (to my knowledge) it won't try to > keep multiple instances running them in parallel. Oops, I should have checked the man page before I wrote. It seems that at least some version of xargs have a '-P' for 'parallel' mode.