From: "Walter Dnes" <waltdnes@waltdnes.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Colorized output when piping to tee
Date: Mon, 18 Dec 2017 15:26:21 -0500 [thread overview]
Message-ID: <20171218202621.GA26975@waltdnes.org> (raw)
In-Reply-To: <AM5P195MB00674BC1177013DD2A2C563CEF0E0@AM5P195MB0067.EURP195.PROD.OUTLOOK.COM>
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 <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
prev parent reply other threads:[~2017-12-18 20:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 19:46 [gentoo-user] Colorized output when piping to tee Ramon Fischer
2017-12-18 20:11 ` David Haller
2017-12-18 20:26 ` Walter Dnes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171218202621.GA26975@waltdnes.org \
--to=waltdnes@waltdnes.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox