Echo and text color display

Source: Internet
Author: User
Tags echo display

Let echo output color characters: Echo Display in shell script color display, echo display with color, need to use parameter-e \033 can be replaced \e format as follows: Echo-e "\033[word background color; text color m string \033[0m" Example: ECHO-E "\033[41;36m something here \033[0m" where 41 of the position represents the background, 36 of the position is the color of the word Note: 1, the use between the numbers; separated by 2 and finally a M

650) this.width=650; "src=" Http://i.imgur.com/pqUhH2c.png "style=" margin:0px;padding:0px;border:0px; "alt=" Pquhh2c.png "/>



Other controls: \033[0m Close all properties \033[1m set high brightness \033[4m underline \033[5m flicker \033[7m reverse \033[8m fade




The application in the script

[email protected] ~]# cat f1.sh echo-e "\033[43;31mhello world\033[0m" [[email protected] ~]# bash f1.sh

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/85/9E/wKiom1eqhXjBw4DAAAAHgcR6SHg250.png-wh_500x0-wm_3 -wmp_4-s_3991790725.png "title=" Sh.png "alt=" Wkiom1eqhxjbw4daaaahgcr6shg250.png-wh_50 "/>


Another kind of application in text

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/85/9D/wKioL1eqhnbhpXuZAAAFHVQtsQE469.png "title=" Cat.png "alt=" Wkiol1eqhnbhpxuzaaafhvqtsqe469.png "/>

^[Printing Method Ctrl + V do not let go quickly press the [key


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/85/9E/wKiom1eqhsihVVrlAAAHd8KUnoc095.png "title=" Echo1.png "alt=" Wkiom1eqhsihvvrlaaahd8kunoc095.png "/>



can have the same effect as executing a script




This article is from the "Homecoming" blog, make sure to keep this source http://sixijie123.blog.51cto.com/11880770/1836396

Echo and text color display

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.