How can i print the standard error in red into the console instead of using the same color of the standard output?
Is it possible using Gnome Terminal ?
gnome-terminal
How can i print the standard error in red into the console instead of using the same color of the standard output?
Is it possible using Gnome Terminal ?
Best Answer
I use stderred and have found it a good solution. As its readme notes:
It is straightforward to compile, but you do need to build it from source by following the instructions from its Github site:
Then
Then
The most important part of it is to add the appropriate line to your
.bashrc
; you must link to thelibstderred.so
file in the build directory; you must use the absolute path where the build directory is (/home/mike/src/stderred/build). I add the following to my.bashrc
:Obviously, when you don't want to use it anymore, remove the above line from your
.bashrc
and restart the terminal.The results, tested on non-existent files (it obviously will not work when
sudo
is used, as the user's.bashrc
will not be read when the different environment is set):(By the way it doesn't turn my duke@nukem prompt red as that was red already)