Bash – Printing STDERR in Red Color

bashcolorstderr

Is there a way to make bash display stderr messages in red color?

Best Answer

command 2> >(while read line; do echo -e "\e[01;31m$line\e[0m" >&2; done)