I run an application and pipe the output to grep. This works. However, I wish to show the output on both screen and write to file.
So I am piping the grep result to tee:
./app | grep something | tee file.txt
However, this is not showing (or writing) results, even when there are 100% results (I've confirmed this with two running instances).
How do I grep the app's output, write to file and show on screen?