On Fri, 2002-10-18 at 14:37, John Bleichert wrote:
> On Fri, 18 Oct 2002, David Smithson wrote:
> 
> > Date: Fri, 18 Oct 2002 12:33:46 -0700
> > From: David Smithson <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: question: sending to stdout AND file
> > 
> > Hi all.
> > 
> > This question is not specifically FreeBSD related.
> > 
> > How do I redirect output to a file *and* stdout simultaneously.  My
> > particular want is to view the output of a script while also logging the
> > output to a text file.
> > 
> > Thanks for your time.
> > 
> > --
> > David Smithson - Systems Administrator
> > Custom Film Effects (http://www.customfilmeffects.com)
> > 
> 
> One way is to use the tee command, e.g.:
> 
> [johnnyb@zappa johnnyb]$ ls | tee listing.txt
> 
> will send the results of the ls command to STDOUT and also to the file 
> listing.txt.
> 
Another helper in these is the script(1) command.

Read man script. 



-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to