From owner-freebsd-bugs@FreeBSD.ORG Thu Jun 29 16:20:13 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36F8D16A492 for ; Thu, 29 Jun 2006 16:20:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 820E543D77 for ; Thu, 29 Jun 2006 16:20:12 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k5TGKCUY079850 for ; Thu, 29 Jun 2006 16:20:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k5TGKChr079848; Thu, 29 Jun 2006 16:20:12 GMT (envelope-from gnats) Date: Thu, 29 Jun 2006 16:20:12 GMT Message-Id: <200606291620.k5TGKChr079848@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Thomas David Rivers Cc: Subject: Re: bin/99585: [PATCH] Add option to tee(1) to also copy to standard error X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Thomas David Rivers List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 16:20:13 -0000 The following reply was made to PR bin/99585; it has been noted by GNATS. From: Thomas David Rivers 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 Date: Thu, 29 Jun 2006 12:13:10 -0400 (EDT) > > >>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