Format: Echo"/033[Word background color; font color m string/033[control code"If you simply display the font color can be fixed control code bit 0m. Format: Echo"/033[Word background color; font Color m string/033[0m"Word Background color range:40-4940:Black41:Crimson42:Green43:Yellow44:Blue45:Purple46:Dark green47:White Word color:30-3930:Black31:Red32:Green33:Yellow34:Blue35:Purple36:Dark green37:White ANSI control code \033[0m close all properties \033[01m set high brightness \033[04m underline \033[05m blinking \033[07m reverse display \033[08m blanking \033[30m--\033[37m set foreground color \033[40m--\033[47m set background color \033[NA cursor moves up n rows \033[NB cursor moves down n lines \033[NC cursor shifts right n rows \033[nd cursor moves left n rows \033[y; XH set cursor position \033 033[k clears the contents from the cursor to the end of the line \033 [s Save cursor position \033[u restore cursor position \ 033[? 25l hidden cursor \033[? 25h Display cursor For example: Make the font red and keep flashing #echo-e "\033[31m \033[05m Please confirm your operation, enter [y/n] \033[0m " or # echo-e "\033[31m \033[05m Please confirm your operation, enter [y/n] \033[0m"
Shell Displays color output