Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Multi-core loops
- X-seq: zsh-users 14209
- From: "Nadav Har'El" <nyh@xxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Multi-core loops
- Date: Sun, 28 Jun 2009 13:45:38 +0300
- Hebrew-date: 6 Tammuz 5769
- In-reply-to: <20090628103129.GA15270@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20090628103129.GA15270@xxxxxxxxxxxxxxxxxxxxxxxxxx>
On Sun, Jun 28, 2009, Nadav Har'El wrote about "Multi-core loops":
>..
> The first thread I cited suggested adding a loop new syntax, e.g.
>
> for i in * PARALLEL N ; do job $i ; done
>..
I tried to look around if perhaps other shells implemented a similar feature,
and what syntax they had used.
I found one implementation in a shell called psh, the parallel shell, also
known as (amusingly :-)) "the Pourne Shell". The syntax they used is this:
# Do 4 jobs concurrently
set -j4
# same as a for loop, but pays attention to the j flag.
pfor i in 3 5 11 21 8 9 13 7
do
...
done
The only trace I can find of this shell on the Internet, however, is this
page in Google's cache:
http://209.85.129.132/search?q=cache:YhHuBOkhhK4J:bleu.west.spy.net/~dustin/projects/psh.xtp+%22pourne+shell%22&cd=3&hl=en&ct=clnk
Nadav.
--
Nadav Har'El | Sunday, Jun 28 2009, 6 Tammuz 5769
nyh@xxxxxxxxxxxxxxxxxxx |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |Tact: The ability to describe others as
http://nadav.harel.org.il |they see themselves. - Abraham Lincoln
Messages sorted by:
Reverse Date,
Date,
Thread,
Author