Using tee to create a log

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Kurt Granroth
Date:  
Subject: Using tee to create a log
On Thu, 26 July 2001, Alan Dayley wrote:
> I have a command line utility that spits out data on the screen as it
> runs. I want to capture this data to a "log" file so I can read it later.
> I have been told the tee command will do this for me but I can't seem to
> get the command line correct as the log file is always empty.


This should do it:

% your_utility | tee output.log

Mind you, 'tee' only works on stdout so if your utilties output is really on 
stderr, it won't capture it by default.
-- 
Kurt Granroth            | http://www.granroth.org
KDE Developer/Evangelist | SuSE Labs Open Source Developer
         | 
            KDE -- Conquer Your Desktop