Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jun 2006 12:13:10 -0400 (EDT)
From:      Thomas David Rivers <rivers@dignus.com>
To:        bde@zeta.org.au, dcp1990@neptune.atopia.net
Cc:        freebsd-bugs@freebsd.org, FreeBSD-gnats-submit@freebsd.org
Subject:   Re: bin/99585: [PATCH] Add option to tee(1) to also copy to standard error
Message-ID:  <200606291613.k5TGDA302019@lakes.dignus.com>
In-Reply-To: <20060629155456.GA15303@neptune.atopia.net>

next in thread | previous in thread | raw e-mail | index | archive | help

> 
> >>Description:
> >	I recently found myself in a situation where having tee(1) copy to 
> >	standard error and standard output at the same time would be useful, 
> >	so I implemented it.
> >>How-To-Repeat:
> >	Find yourself in said situation.
> >>Fix:
> >	Diff below.
> 
> Why not use a standard utility (tee itself in this case)?
> 
>   genoutput | tee /dev/stderr | tee foo
> 
> copies the stdout of `genoutput' to stderr and to file foo.  This can be
> generalized to any number of copies on any numbers of file descriptors
> or files.
> 

Uhh...

What's wrong with:

	genoutput 2>&1 | tee foo

	- Dave Rivers -

--
rivers@dignus.com                        Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606291613.k5TGDA302019>