Shell Displays color output

Source: Internet
Author: User
Tags clear screen set background

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.