Subject: Re: psh
To: Christos Zoulas <christos@zoulas.com>
From: Simon J. Gerraty <sjg@quick.com.au>
List: current-users
Date: 10/19/1998 17:21:25
>What is wrong with:

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

That will attempt to do all the jobs in parallel as opposed
to keeping n processes running.  The difference becomes very
significant when the total number of jobs to be run is large.
You can end up just thrashing the box rather than minimizing
run time.

But I'd use 

	cat machinelist | parallel -n 8 ssh -n {} "$@" > big.out

[see previous post]

and parallel ensures that the stdout from each process is 
appended without interleaving which can be very important.

--sjg