> > ... not sure how that can be done with a standard shell, and
> > that's a must. Maybe something using named pipes and so -
> > will play around a little.
> Would probably be more portable to write a little bit of C code that
> opens several libpq connections and reads a script file with
> interleaved commands to send to the different connections.
There are tools I'd consider using for this such as tcl/expect which
help with simulating interactive sessions and with coordinating
multiple actions. Forget the "sh only" approach if it makes things
difficult; some platforms ship with a much richer toolset, and these
tools might be well suited to your problem.
If it works and there is a big demand for the "sh tools" then someone
can recode it later, and it isn't holding you up now.
... my 2 cents...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California