From owner-freebsd-bugs@FreeBSD.ORG Thu Jun 29 16:12:50 2006 Return-Path: X-Original-To: freebsd-bugs@freebsd.org Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8479E16A415; Thu, 29 Jun 2006 16:12:50 +0000 (UTC) (envelope-from rivers@dignus.com) Received: from dignus.com (client196-2.dsl.intrex.net [209.42.196.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E56B43D5A; Thu, 29 Jun 2006 16:12:47 +0000 (GMT) (envelope-from rivers@dignus.com) Received: from lakes.dignus.com (lakes.dignus.com [10.1.0.3]) by dignus.com (8.13.1/8.12.9) with ESMTP id k5TGBnlR001704; Thu, 29 Jun 2006 12:11:49 -0400 (EDT) (envelope-from rivers@dignus.com) Received: (from rivers@localhost) by lakes.dignus.com (8.11.6/8.11.3) id k5TGDA302019; Thu, 29 Jun 2006 12:13:10 -0400 (EDT) (envelope-from rivers) Date: Thu, 29 Jun 2006 12:13:10 -0400 (EDT) From: Thomas David Rivers Message-Id: <200606291613.k5TGDA302019@lakes.dignus.com> To: bde@zeta.org.au, dcp1990@neptune.atopia.net In-Reply-To: <20060629155456.GA15303@neptune.atopia.net> X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on office.dignus.com 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 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 16:12:50 -0000 > > >>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