linux 打印颜色

2019-07-05 11:40:01 浏览数 (1)

File: echo_color.sh

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

reset_color="33[0;00m"

echo_light_green() { printf

1" printf

blue echo "

reset_color }

echo_light_blue() { printf

1" printf $reset_color }

echo_yellow() { printf

1" printf

red echo "

reset_color } echo_red

1 echo_blue $1

0 人点赞