Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Multi-core loops



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