I've been away from this thread for a while.
Would it be possible to have this sort of command still
cmd1 | cmd2 but have the
sqlplus in
cmd2? The
cmd1 would need to be reading a file or pipe that
cmd2 writes to.
An alternative might be something like
cmd1 < <(cmd2) and this time the
sqlplus is in
cmd1. This is a
bash way rather than
ksh.
Can you tell us more about the output that the
sqlplus will create and how/why it must then take in new input depending what it throws out? It might be better to set it up as a set of separate calls, i.e.
- script calls sqlplus call to generate some output into work-file1 and then exit
- script reads work-file1 and calls sqlplus with appropriate input, writing work-file2
- script reads work-file2 and calls sqlplus with appropriate input, writing work-file3
.... and so on until you have the desired output.
Does anyone care to shoot me down to say that these are all bad approaches? I'd be happy to illustrate how not to do it if that's useful to the thread.
I'm just a bit lost about why the
sqlplus needs to have input based on it's output. Have I missed the point?
Robin