This article introduces how to colorize stderr (error output) in the Bash command line.
color()(set -o pipefail;"$@" 2>&1>&3|sed
[bash: print stderr in red color - Server Fault](https://serverfault.com/questions/59262/bash-print-stderr-in-red-color)
s,.*,\e[31m&\e[m,'>&2)3>&1
# e.g.
# color sudo apt update
bash: print stderr in red color - Server Fault
This way, define the color() function and colorize with the sed command.
Use colorization in the Bash command line to increase work efficiency.
Thatโs all.