I have two binaries, one (questions.bin
) throws questions like "What's 1+3?" to STDOUT and gets answers from STDIN; the other, answers.bin
, takes questions in STDIN in the above format and prints them to STDOUT.
I wanted to be able to pipe the outputs of them to each other, something like
./questions.bin | ./answers.bin | ./questions.bin
Is there any way to do that with piping? If not, how would you do it otherwise?