Shell script (strict control Terminal format, beautiful output font color)

#! / Bin / bash
#
# The following is the output color and font format control terminal
# Font 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 character \ 033 [0m”
echo -e “\ 033 [36m azure word \ 033 [0m”
echo -e “\ 033 [37m white lettering \ 033 [0m”

# Character background color range: 40-47
echo -e “\ 033 [40; 37m black and white \ 033 [0m”
echo -e “\ 033 [41; 30m Black on Red \ 033 [0m”
echo -e “\ 033 [42; 34m green background with blue characters \ 033 [0m”
echo -e “\ 033 [43; 34m yellow background with blue characters \ 033 [0m”
echo -e “\ 033 [44; 30m blue black \ 033 [0m”
echo -e “\ 033 [45; 30m purple and black bottom \ 033 [0m”
echo -e “\ 033 [46; 30m sky blue and black bottom \ 033 [0m”
echo -e “\ 033 [47; 34m white with blue characters \ 033 [0m”
# …..

# Control Option Description
# \ 033 [0m close all properties
# \ 033 [1m set high brightness
# \ 033 [4m underscore
echo -e “\ 033 [4; 31m underlined in red \ 033 [0m”
# Flashes
echo -e “\ 033 [5; 34m red flashing \ 033 [0m”
# Anti Movies
echo -e “\ 033 [8m blanking \ 033 [0m”
#

# \ 033 [30m- \ 033 [37m set the foreground color
# \ 033 [40m- \ 033 [47m set the background color
# \ 033 [Move cursor n rows on nA
# \ 033 [nB cursor down n lines
echo -e “\ shift 4 rows \ 033 [0m on 033 [4A cursor”

# \ 033 [nC cursor right n rows
# \ 033 [nD cursor left n rows
# \ 033 [y; xH set the cursor position
# \ 033 [2J clear screen
# \ 033 [K Clears the contents from the cursor to the end of the line
echo -e “\ 033 [K Clears the contents of the cursor to end of line \ 033 [0m”

# \ 033 [s Save Cursor Position
# \ 033 [u restore the cursor position
# \ 033 [25 |? Hide the cursor
# \ 033 [? 25h display cursor
echo -e “\ 033 [? 25l hide the cursor \ 033 [0m”
echo -e “\ 033 [? 25h display cursor \ 033 [0m”

# The following example is a font not stop flashing.
#! / Bin / bash
#
a = 30
b = 41
while true
do
echo -e “\ 033 [$ {a} m brilliant girl \ 033 [0m”
echo -e “\ 033 [$ {a} m do Valencia \ 033 [0m”
echo -e “\ 033 [$ {a} m Roxas \ 033 [0m”
a = $ (($ (($ a% 7)) + 30))
b = $ (($ (($ b% 7)) + 40))
# Every time make the font color in 30-37 conversion
# Every time let the background color in 40-47 conversion
echo -e “\ 033 [4A \ 033 [0m”
done