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?
2.1m questions
2.1m answers
60 comments
57.0k users