From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B17A3139083 for ; Mon, 18 Dec 2017 20:27:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5954BE0E33; Mon, 18 Dec 2017 20:26:36 +0000 (UTC) Received: from pmta31.teksavvy.com (pmta31.teksavvy.com [76.10.157.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 19DFEE0C3F for ; Mon, 18 Dec 2017 20:26:35 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2HiHABTIzha//t/3mhdHQEBBQELAYM+g?= =?us-ascii?q?VoniR6GB44UAYIzAZkBHYUiBAIChQZEFAEBAQEBAQEBAQNoKIUlBjocMwshExI?= =?us-ascii?q?PBSU3iiqtN4poATGDboJigQKFFYMvgjqCeoIyBYpDiGyQDQKCPZJggiOJbhqHV?= =?us-ascii?q?YpNjWY2I4FPfAiCZYR0IzeKFwEBAQ?= X-IPAS-Result: =?us-ascii?q?A2HiHABTIzha//t/3mhdHQEBBQELAYM+gVoniR6GB44UAYI?= =?us-ascii?q?zAZkBHYUiBAIChQZEFAEBAQEBAQEBAQNoKIUlBjocMwshExIPBSU3iiqtN4poA?= =?us-ascii?q?TGDboJigQKFFYMvgjqCeoIyBYpDiGyQDQKCPZJggiOJbhqHVYpNjWY2I4FPfAi?= =?us-ascii?q?CZYR0IzeKFwEBAQ?= X-IronPort-AV: E=Sophos;i="5.45,423,1508817600"; d="scan'208";a="14202612" Received: from 104-222-127-251.cpe.teksavvy.com (HELO waltdnes.org) ([104.222.127.251]) by smtp.teksavvy.com with SMTP; 18 Dec 2017 15:26:34 -0500 Received: by waltdnes.org (sSMTP sendmail emulation); Mon, 18 Dec 2017 15:26:21 -0500 From: "Walter Dnes" Date: Mon, 18 Dec 2017 15:26:21 -0500 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Colorized output when piping to tee Message-ID: <20171218202621.GA26975@waltdnes.org> References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Archives-Salt: fa9f3d78-c7ca-4edd-b4d4-0ab3aeffe263 X-Archives-Hash: f1e68c89e26e227a44f5237b921da63e On Mon, Dec 18, 2017 at 07:46:16PM +0000, Ramon Fischer wrote > Hi there, > > I am looking for a way to have a colorized output when piping to tee, e.g.: > > /usr/bin/emerge --ask --update --deep --newuse --tree --verbose @world | tee --append nom.txt > > I already tried installing "dev-tcltk/expect" which should actually contain "unbuffer" which can help me out. But there is no unbuffer command. > > Am I missing something or is there any other way to do that? From "man emerge" --color < y | n > Enable or disable color output. This option will override NOCOLOR (see make.conf(5)) and may also be used to force color output when stdout is not a tty (by default, color is disabled unless stdout is a tty). So you'd want... /usr/bin/emerge --color y --ask --update --deep --newuse --tree --verbose @world | tee --append nom.txt Insert "--color y" into the command. -- Walter Dnes I don't run "desktop environments"; I run useful applications