Subject: Re: psh
To: dustin sallings <dustin@spy.net>
From: Simon J. Gerraty <sjg@quick.com.au>
List: current-users
Date: 10/19/1998 17:11:43
>NAME
>       psh - parallel command interpreter (shell)

I have the same requirement, but I solved it with:

NAME
     parallel - run command line for each arg from stdin


SYNOPSIS
     parallel [-n n] command [arg] ... < arglist


DESCRIPTION
     This tool executes command for each element of arglist.   If
     command  contains  any spaces or I/O redirection, we pass it
     to sh(1) to execute it (there should be no additional args),
     otherwise we first attempt to exec(2) command directly.

...

I have .sh,.pl and C versions of this tool and it is used on several
platforms to run jobs (like gathering some data from 1000 routers)
in parallel.  

For serious parallel SNMP collection I have a dedicated tool
that can collect 100's of vars from 1000's of routers in parallel,
but for most tasks simply running 8-20 instances of a standard
tool does the job.

Anyway, hacking this into sh is probably not the best solution.

--sjg