Maybe you mean this:
$ prog1 | insightII
This starts prog1 as well as insightII. Then the stdout of prog1 is directed to stdin of insightII, which means, if prog1 writes "quit" or something else to stdout, insightII will see "quit" just as if you had written it.
What is this command sending program? Does it already exist? Or do you want to program one?