Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!nntpd.lkg.dec.com!engage!ynotme.enet.dec.com!wallace From: wallace@ynotme.enet.dec.com (Ray Wallace) Newsgroups: comp.unix.questions Subject: Re: using tee program with tar output Message-ID: <1991May10.154135.21510@engage.enet.dec.com> Date: 10 May 91 15:32:15 GMT Sender: news@engage.enet.dec.com (USENET News System) Organization: Digital Equipment Corporation Lines: 24 In article <26840@adm.brl.mil>, sean@dmr.asa.com (Sean Baker) writes... >I'm trying to redirect the output of tar to a file. > >I can do this fine in the csh by using: > > tar cvf tarfile /tmp |& tee tar.out First, in csh can't this be done without tee? Like this - tar cvf tarfile /tmp >& tar.out >But how do I do this with the Bourne shell? I can't seem to >get both stdin and stdout sent to the tee program? In sh it is - tar cvf tarfile /tmp > tar.out 2>&1 Either that or (being fairly new to Unix) I missunderstood the question. --- Ray Wallace (INTERNET,UUCP) wallace@oldtmr.enet.dec.com (UUCP) ...!decwrl!oldtmr.enet!wallace (INTERNET) wallace%oldtmr.enet@decwrl.dec.com ---