脚本里的颜色设置

black='/E[30;40m'
red='/E[31;40m'
green='/E[32;40m'
yellow='/E[33;40m'
blue='/E[34;40m'
magenta='/E[35;40m'
cyan='/E[36;40m'
white='/E[37;40m'
move='/E[5m'

highlight='/33[1m'
underline='/33[4m'

 

#下面是应用的例子

#color.sh

echo -e "$green$move$highlight************************************"
tput sgr0
echo -e "$green$move*`tput sgr0`$magenta$highlight /bThis is a example for color script$green$move*"
echo -e "$green$move************************************"
tput sgr0

你可能感兴趣的:(脚本里的颜色设置)