shell脚本输出颜色控制

#!/bin/bash
##################################################################
#
#   @brief: color output
#   @auth:  
#   @date:  
#   @update:
#
##################################################################
# #!/bin/bash: must at the top of file


# color defines for terminal
col_black=30
col_red=31
col_green=32
col_orange=33
col_blue=34
col_pulpe=35
col_dark_green=36
col_white=37
# \033=\E, macos not support \E
color_green='\033[1;32m'
color_read='\033[1;31m'
color_org='\033[1;33m'
color_reset='\033[0m'


# echo e:  It allows you to use special characters and control sequences in the output
echo -e "${color_org}--This color that U like...${color_reset}"


echo -e "${color_green}--Green color...${color_reset}"

你可能感兴趣的:(shell)