using tee program with tar output

LEWIS WILLIAM M JR lewis at tramp.Colorado.EDU
Sat May 11 02:00:39 AEST 1991


In article <26840 at adm.brl.mil> sean at dmr.asa.com (Sean Baker) writes:
>
>Hello,
>
>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
>
>But how do I do this with the Bourne shell?  I can't seem to ...

Try:
	{ tar cvf tarfile /tmp 2>&1 } | tee tar.out

I haven't tried it, but it should work.



More information about the Comp.unix.questions mailing list