I have a little c-program, d, that takes a long time and produces a lot of text output.
When I run the the program with ./d I can see the output being scrolled on the screen
but if I do
./d > d10.txt
I can't read d10.txt with cat d10.txt until the program has finished.
Why is this so and what can I do to monitor the output while the program is running?
Thanks for any tip
H
You can't see the output because you are redirecting it into the file.
To both see the output and store it in a file, use the
tee
program:You could also do this, but it's much more work: