Linux 命令行中使用带颜色的输出


Author: yifei / Created: April 4, 2018, 2:13 p.m. / Modified: April 4, 2018, 10:14 p.m. / Edit

http://misc.flogisoft.com/bash/tip_colors_and_formatting

We just have to use \033

The most frequently used format would be \033[31mtext here \033[0m

比如:echo \033[31mtext here \033[0m


评论区