Quote:
Originally Posted by hardwickj
Any other ideas? Could I use a popen() instead of sytem() to do this?
popen() is going to do just what system() is doing, only it will allow you to read the output of the command, or to feed input to the command. Apart from that, pretty much the same.
You will actually have to write a C program to do what you are doing. Just from the first few lines of the script that you have in the first post, you are going to have to use getenv, setenv, fopen, fprintf... most probably fork() and exec() too...