Subject: Re: psh
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: current-users
Date: 10/19/1998 06:27:56
In article <Pine.NEB.4.02.9810181515290.23665-100000@dhcp-199.west.spy.net> dustin@spy.net (dustin sallings) writes:

[stuff deleted]

>As I add machines, it takes longer and longer, and there's no reason to
>run serially, so instead of doing:
>
>for i in `cat machinelist`
>do
>	ssh $i $*
>done
>
>	I can do this:
>
>MAXKIDS=8
>
>pfor i in `cat machinelist`
>do
>	ssh $i $*
>done
>
>	And have it always be doing 8 at a time when it can.  The default
>is 1, so it'll behave like an inefficient for loop (it'll still fork a
>child to do the work.

What is wrong with:

for i in `cat machinelist`
do
	ssh -n $i "$@" &
done

christos