Date: 18 Oct 2002 14:43:48 -0500 From: Larry Rosenman <ler@lerctr.org> To: John Bleichert <syborg@stny.rr.com> Cc: David Smithson <david@customfilmeffects.com>, questions@FreeBSD.ORG Subject: Re: question: sending to stdout AND file Message-ID: <1034970228.533.18.camel@lerlaptop.iadfw.net> In-Reply-To: <Pine.LNX.4.44.0210181536530.18356-100000@janeway.vonbek.dhs.org> References: <Pine.LNX.4.44.0210181536530.18356-100000@janeway.vonbek.dhs.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <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. > 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: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 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?1034970228.533.18.camel>