There is an application that infinitely outputs something to console every 30 seconds.
For example,
./app # after 30 seconds output1 # after 30 seconds output2 # after 30 seconds output3 . . .
I'm trying to save the output to file using piping.
How can I flush the content in the pipe every 30 seconds, so that the file content can be rewritten with the new output?
1.4m articles
1.4m replys
5 comments
57.0k users