[暑假学习笔记]三、Linux Shell 脚本攻略3

打印彩色输出

前景色

重置=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开头的是背景色

posted @ 2012-07-11 16:55  偏执狂xj  阅读(174)  评论(0)    收藏  举报