I have a shell script that greps some data.. I want to print the result into a file, but doing that prevents the result being displayed on the terminal. Is there a way that
Note you can add the -a flag to tee to append to the output file
-a
tee
[me@home]$ echo hello | tee out.txt hello [me@home]$ echo hello again | tee -a out.txt hello again [me@home]$ cat out.txt hello hello again