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

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

     parallel - run command line for each arg from stdin

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

     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.