echo display in script with color display, echo display with color, need to use parameter-E
The format is as follows: Echo-e "\033[word background color; text color m string \033[0m"
For example: Echo-e "\033[41;36m something here \033[0m" where 41 of the position represents the background, and 36 is the color representing the word
Note: 1, the word background color and the text color is in English ""
2. There is a m behind the text color
3, before and after the string can have no space, if any, the output is also a space
Those ASCII code is the whole story of the color call.
\033[, M ... \033[0m
Word Color: 30-–37
Echo-e "\033[30m Black character \033[0m"
Echo-e "\033[31m Red word \033[0m"
Echo-e "\033[32m Green word \033[0m"
Echo-e "\033[33m Yellow word \033[0m"
Echo-e "\033[34m Blue word \033[0m"
Echo-e "\033[35m Purple word \033[0m"
Echo-e "\033[36m sky blue Word \033[0m"
Echo-e "\033[37m White character \033[0m"
Word background color range: 49----
40: Black
41: Crimson
42: Green
43: Yellow
44: Blue
45: Purple
46: Dark Green
47: White
Description of the ===============================================ansi control code
\33[0m Close All Properties
\33[1m Setting High brightness
\33[4m Underline
\33[5m Flashing
\33[7M Reverse Display
\33[8m blanking
\33[30m--\33[37m setting foreground color
\33[40m--\33[47m Set background color
\33[na the cursor to move n rows
\33[NB cursor down n rows
\33[NC cursor right shifts n rows
\33[nd cursor left n rows
\33[Y;XH Setting the cursor position
\33[2J Clear Screen
\33[k clears the contents from the cursor to the end of the line
\33[s Save Cursor position
\33[u Restore cursor Position
\33[?25l Hide Cursor
\33[?25h Display cursor
====
Reference link http://www.2cto.com/os/201207/144887.html
Settings for Shell script colors