In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Objective:
When the script is used, if the output is colored, you can determine what went wrong with the script. The echo parameter, which indicates the font with color.
Echo-help or man echo
Echo display with color, you need to use the parameter-e
The format is as follows:
Echo-e "\ 033 [word background color; text color m string\ 033 [0m"
For example:
Echo-e "\ 033 [41th 37m TonyZhang\ 033 [0m"
The position of 41 represents the background color, and the position of 37 represents the color of the word.
Tip:
1. Symbol English "
2. There is an m after the text color, so don't ignore it.
3. There can be no spaces before and after the string, and if so, the output also has spaces.
~
Eg:
Echo-e "\ 033 [34m blue word\ 033 [0m"
Echo-e "\ 033 [35m purple word\ 033 [0m"
Echo-e "\ 033 [36m Sky Blue character\ 033 [0m"
Echo-e "\ 033 [37m White word\ 033 [0m"
Echo-e "\ 033 [30m black words\ 033 [0m"
Echo-e "\ 033 [31m red word\ 033 [0m"
Echo-e "\ 033 [32m green word\ 033 [0m"
Echo-e "\ 033 [33m × × × words\ 033 [0m"
Add the background color:
Echo-e "\ 033 [44th 37m Blue background White characters\ 033 [0m"
Echo-e "\ 033 [45th 37m purple background white characters\ 033 [0m"
Echo-e "\ 033 [46th 37m Sky Blue background White characters\ 033 [0m"
Echo-e "\ 033 [47umbent 30m black character on white background\ 033 [0m"
Echo-e "\ 033 [40 Ten 37m black background white characters\ 033 [0m"
Echo-e "\ 033 [41bot 37m red background white character\ 033 [0m"
Echo-e "\ 033 [42bot 37m White characters on green background\ 033 [0m"
Echo-e "\ 033 [43bot 37m Yellow background White character\ 033 [0m"
Other uses:
\ 33 [4m underline
\ 33 [5m flicker
\ 33 [0m turn off all properties
\ 33 [1m set high brightness
\ 33 [move the nC cursor to the right n lines
\ 33 [nD cursor move left n lines
\ 33 [ytrexh sets the cursor position
\ 33 [2J clear screen
\ 33 [K clear the contents from the cursor to the end of the line
\ 33 [s Save cursor location
\ 33 [u restore cursor position
\ 33 [? 25l hide the cursor
\ 33 [? 25h display cursor
\ 33 [7m reverse display
\ 33 [8m blanking
\ 33 [30m--\ 33 [37m set foreground color
\ 33 [40m--\ 33 [47m set background color
\ 33 [nA cursor up n lines
\ 33 [nB cursor down n lines
~
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.