Dialog with an external program using named pipes

Dear community,

I communicate with an external program (maxima) using named pipes. If I use a text file to capture the output (maxima > out.txt) i can see the programs answer directly after the input written into the file. But if bypass the output into a named pipe (maxima > pipe) and capture it using cat (cat < pipe) I get the hole output not until the external program is closed.

It would be very nice if someone of you can tell me how I can realize a dialog with the external program using pipes.

best regards and thanks in advance
Raphael

Did you consider stdbuf ? man stdbuf :