Output colored text in the shell using the echo commandNameecho-Displays a line of textProfileecho [Options] ... [String] ...DescribeOutputs a string to the standard output.-N does not output line breaks-E Open backslash ESC escape-e Suppress
The echo display in the shell script is displayed in color with the echo displayed in color with the parameter-EThe format is as follows:
Copy Code code as follows:
Echo-e "\033[character background color; text color m string \033[0m"
echo Display in shell script with color display, echo display with color, need to use parameters-The e format is as follows: The copy code code is as follows: Echo-E"\033[Word background color; text color m string \033[0m"For example, copy the code
echo Display in shell script with color display, echo display with color, need to use parameter-EThe format is 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
Shell-5.shell echo CommandEcho---display contentFormat: Echo [options] Text-N Do not wrap in the last line-E parsing escape character\a issued a warning sound\c Finally, no newline symbol is added.\f Line break\ r Enter1.-N do not wrap in the last
There are two ways to bring the echo output color
Define color variables in shell scripts, use ECHO-E to call variables
When defining a variable, define the ECHO-E in the variable, and then output the variable
Shell script that
It's fun for the terminal print in the shell!First know that the end of the shell print has echo printf is commonly used is echo slightly;
Note: Font Color reset = 0, black = 30, red = 31, green = 32, ***=33, blue = 34, magenta =35, cyan = 36,
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,
Use echo in shell to print the color font and background
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,
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.