It's fun to print the terminal in shell! First, we know that echo is commonly used in the terminal printing echoprintf in shell. note: the font color is reset to 0, black = 30, red = 31, Green = 32, * ** = 33, blue = 34, Magenta = 35, Cyan = 36, white = 37. background color reset = 0, black = 40, red = 41, green = 42, *** = 43, blue = 44, Magenta = 45, Cyan = 4
It's fun to print the terminal in shell!
First, we know that echo printf is usually used in shell Terminal Printing;
Note: Font color reset = 0, black = 30, red = 31, Green = 32, *** = 33, blue = 34, Magenta = 35, Cyan = 36, white = 37.
Background color reset = 0, black = 40, red = 41, green = 42, *** = 43, blue = 44, Magenta = 45, Cyan = 46, white = 47.
To print the color text, enter the following command:
|
# Echo-e "\ e [1; 36 m \ e [0 m" |
Set \ e [1; 36 to cyan \ e [0 to reset the color. 4 If you want other colors, you only need to replace 36 with numbers corresponding to other colors;
To set a color background, enter the following command:
|
# Echo-e "\ e [1; 41 m \ e [0 m" |
Let's play with the rest!