I need to write a C program (myprogram
) which checks output of other programs. It should basically work like this:
./otherprogram | ./myprogram
But I could not find how to read line-by-line from stdout
(or the pipe), and then write all this to stdout
.