Date: Fri, 18 Oct 2002 15:37:57 -0400 (EDT) From: John Bleichert <syborg@stny.rr.com> To: David Smithson <david@customfilmeffects.com> Cc: questions@FreeBSD.ORG Subject: Re: question: sending to stdout AND file Message-ID: <Pine.LNX.4.44.0210181536530.18356-100000@janeway.vonbek.dhs.org> In-Reply-To: <014101c276dd$4681b1f0$0801a8c0@customfilmeffects.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 18 Oct 2002, David Smithson wrote: > Date: Fri, 18 Oct 2002 12:33:46 -0700 > From: David Smithson <david@customfilmeffects.com> > To: questions@FreeBSD.ORG > 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. HTH - JB # John Bleichert # http://vonbek.dhs.org/latest.jpg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.44.0210181536530.18356-100000>