From mboxrd@z Thu Jan 1 00:00:00 1970 From: dexen deVries To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Date: Thu, 30 Aug 2012 15:41:15 +0200 Message-ID: <6386745.9NEQHczKvd@coil> User-Agent: KMail/4.9 (Linux/3.5.0-l45; KDE/4.9.0; x86_64; ; ) In-Reply-To: References: <6c7d84f203a2cc4f3427e177e34fa9d9@brasstown.quanstro.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Subject: Re: [9fans] rc's shortcomings (new subject line) Topicbox-Message-UUID: b412dd58-ead7-11e9-9d60-3106f5b1d025 On Thursday 30 of August 2012 15:35:47 Dan Cross wrote: > (...) > Your example of running multiple 'grep's in parallel sort of reminded= > me of this, though it occurs to me that this can probably be done wit= h > a command: a sort of 'parallel apply' thing that can run a command > multiple times concurrently, each invocation on a range of the > arguments. But making it simple and elegant is likely to be tricky. now that i think of it... mk creates DAG of dependences and then reduces it by calling commands, = going=20 in parallel where applicable. erik's example with grep x *.[ch] boils down to two cases: - for single use, do it simple & slow way -- just run single grep proc= ess for=20 all files - but when you expect to traverse those files often, prepare a mkfile=20= (preferably in a semi-automatic way) which will perform search in paral= lel. caveat: output of one grep instance could end up in the midst of a /lin= e/ of=20 output of another grep instance. --=20 dexen deVries [[[=E2=86=93][=E2=86=92]]] I'm sorry that this was such a long lett=C2=ADer, but I didn't have tim= e to write=20 you a short one. -- Bla=C2=ADise Pasc=C2=ADal