美文网首页linux tools
linux 打印颜色

linux 打印颜色

作者: SkTj | 来源:发表于2019-06-28 11:37 被阅读3次

File: echo_color.sh

red="\033[0;31m"
blue="\033[0;34m"
cyan="\033[0;36m"
green="\033[0;32m"
yellow="\033[0;33m"
purple="\033[0;35m"
light_blue="\033[1;34m"
light_red="\033[1;31m"
light_green="\033[1;32m"
light_gray="\033[0;37m"
light_purple="\033[1;35m"

reset_color="\033[0;00m"

echo_light_green()
{
printf light_green echo "1"
printf reset_color } echo_blue() { printfblue
echo "1" printfreset_color
}

echo_light_blue()
{
printf light_blue echo "1"
printf $reset_color
}

echo_yellow()
{
printf yellow echo "1"
printf reset_color } echo_red() { printfred
echo "1" printfreset_color
}
echo_red 1 echo_yellow1
echo_blue $1

相关文章

网友评论

    本文标题:linux 打印颜色

    本文链接:https://www.haomeiwen.com/subject/psdscctx.html