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
Does exactly your thing
http://linux.die.net/man/1/tee