打印彩色输出
前景色
重置=0;黑色=30,红色=31;绿色=32;黄色=33;蓝色=34;洋红=35;青色=36;白色=37;
echo -e "\e[1;31m This is red text \e[0m"
背景色
重置=0;黑色=40,红色=41;绿色=42;黄色=43;蓝色=44;洋红=45;青色=46;白色=47;
echo -e "\e[1;42m Green Background \e[0m"
3开头的是前景色;4开头的是背景色
打印彩色输出
前景色
重置=0;黑色=30,红色=31;绿色=32;黄色=33;蓝色=34;洋红=35;青色=36;白色=37;
echo -e "\e[1;31m This is red text \e[0m"
背景色
重置=0;黑色=40,红色=41;绿色=42;黄色=43;蓝色=44;洋红=45;青色=46;白色=47;
echo -e "\e[1;42m Green Background \e[0m"
3开头的是前景色;4开头的是背景色
转载于:https://www.cnblogs.com/gal_tree/archive/2012/07/11/2586577.html