I've got a program that can take input from stdin and produces output in the stdout like this:
cat initial_input.txt | myprogram myindex myoptions - | filter_output > outfile.txt
The program loads a data structure (myindex) before starting to process the input, and this can take quite a while. Part of the output is amenable to be fed back to the program. I want to pipe part of the stdout back into the stdin that the program takes, so that it is appended at the end of the initial input the program was called with, without interrupting the initial program execution, since it takes time to initially load myindex into it.
Is there a way to do that?