3

Originally I used pacman, not pacman-color and I copied the output into a file and I displayed the output in the terminal with the following command :

pacman -Syu | tee file.log

Unfortunately, it seems that pacman-color detects that the output is sent to a pipe and it deactives the colored output.
So my question is how to force pacman-color to display a colored output even if the output is sent to a pipe? As with yaourt :

yaourt -Syu --color | tee file.log

Or maybe there is a way to do it without using pipe or tee?

1 Answer 1

3

Try this

script -c 'pacman-color -Syu' file.log

Idea taken from here.

1
  • 1
    Wow awesome it works !!! I had already read the question you linked but I hadn't understand the power of 'script'. And with the '-q' option is usefull to only print the command output. Commented Jan 21, 2013 at 12:01

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.