If I just run "read" app, type a string into console and hit enter I will immediately get this string back to me. I can repeat this endlessly. Here is example of output:
aaaaa
w: aaaaa
bbbbb
w: bbbbb
ccccc
w: ccccc
Now, if I run both applications as: $ ./write | ./read
I get this output:
The problem is that "read" waits until "write" is done outputing and only then reads and prints the strings. I can tell that by 5 sec delay. I need "read" to read the strings one by one and output them immediately. It seems like the string is missing carriage return at the end but by edding "\r" did not help any.
Could you suggest how can I accomplish that, please.
My actual "read" and "write" apps are more complex, I am getting data from the remote server all day long ("write" app) and I need to redirect those data into "read" app for processing. It's all done in real time.