Sunday, September 20, 2009

Nif – tee

This is another entry to my blog after a long hiatus. And I think, I can rev up my blog engine with a very small entry on a nifty unix tool named ‘tee’.
So what does tee do? It creates two output streams for the inputs it receives.
When the output from any command is piped into tee, it displays the output on the STDOUT, and also send the output into the argument to tee.
so something like below would display the output and also write it into the file passed as an argument to tee.

date | tee date_log.log

This would display the date on the STDOUT and also write it into date_log.log
Nifty isn’t it?

No comments:

Post a Comment

Search