In addition to ArchLinux - yaourt: save updatelog?

With tee I am able to get the output at a file and at the terminal at the same time. But when I execute yaourt -Syu | tee yaourt.log in a bash file (which is executed in a terminal) the output of yaourt does not have the usual colors (no colors). Also (sure) when opening the text file you cannot see colors.

  • Is it possible to still see the color formatting of yaourt when executing the above command via a bash script?
  • Is it possible to see the saved text in the same color formatting later again?

An easier way to display the color formatting of yaourt in the terminal and to save the output (with color codes) at the same time in a file is to use the yaourt color option :

yaourt -Syua --color | tee yaourt.log  

To display the log file use :

cat yaourt.log  

instead of a text editor, because the color codes make the log unreadable

  • Great, that works! – user905686 Jan 18 '13 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.