linux echo command color display

Color display echo command:

echo:
      -n: do not wrap.
      -e: Let transferred character into force \ t (tab) \ n (newline).

Example:

$ echo -e "\033[34mabcd\033[0m"
abcd

Wherein: \ 033: symbol corresponding to the control key crtl, [3: indicates the color, 4: indicates the color, from 1-7 start, \ 033 [0m:. This indicates the end of the character as written \ 033 [31-7

$ echo -e "\033[1;5;31mWarning\033[0m" change the password.
Warning change the password.
Warning this field is flashing style.


Guess you like

Origin www.cnblogs.com/saneri/p/11119673.html