shell color

Want to know shell color? we have a huge selection of shell color information on alibabacloud.com

Shell script output with color font __ Zecundi

Output Effect Format control:\033[0m Turn off all properties\033[1m Set High brightness\03[4m Underline\033[5m Flashing\033[7M Reverse Display\033[8m Hidden\033[30m--\033[37m set foreground color\033[40m--\033[47m Set background color Format control for cursor position and so on:\033[na cursor up N line\03[NB cursor Move n line down\033[NC cursor Right n row\033[nd Cursor Left n line\033[Y;XH Set Cursor Po

echo Display content with color display in shell scripts

Tags: 12px false URI toolbar display some using echo scriptecho 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 s

Set the shell script output font color

Echo-e "/033 [32; 49; 1 m [done]/033 [39; 49; 0 m"Output result: [done]###########################The color of the text terminal can be generated using an ANSI unconventional character sequence. Example: Echo-e "/033 [44; 37; 5 m me/033 [0 m Cool" The above command sets the background to blue, foreground white, blinking cursor, output character "me", then reset the screen to the default settings, and output the character "cool ". "E" is an option for

Shell output function with color text

1fi You can optimize the above action function and encode the color information as a parameter. More convenient call. For example, action "blue" "the web status is [OK]". If you do not have this requirement, you will not write it. Okay, it's idle, So I optimized the action function. Only the green and red colors are encoded. Action "green" "the web status is [OK]", called in this way. Code: action(){REG_RED="\e[0;31;1m"REG_GREEN="\e[1;32m"RES="\e[0m

Linux Modify shell command prompt and color

1. Load the configuration file sequence during the Linux login process:/ETC/PROFILE→/ETC/PROFILE.D/*.SH→~/.BASH_PROFILE→~/.BASHRC→[/ETC/BASHRC]Cat ~/.BASHRC #查看 ~/.BASHRC#. BASHRC# User specific aliases and functions# Source Global Definitionsif [-F/ETC/BASHRC]; Then. /etc/bashrcFi2. shell command prompt and color is configured by PS1:echo $PS 1[\[\e[32;40m\]\[email protected]\w]The parameters commonly used

Shell Echo Color Example

#!/bin/bash# Test color for scriptRed_color= ' \e[1;31m 'Green_color= ' \e[1;32m 'Yellor_color= ' \e[1;33m 'Blue_color= ' \e[1;34m 'pink= ' \e[1;35m 'res= ' \e[0m 'If [$#-eq 2]Thenecho "Usage: ' basename $ ' content {Red|blue|yellow|pink|res|green}"Exit 1Fifunction Echo_color () {Case $ inred| RED)Echo-e "${red_color}$1${res}";;green| GREEN)Echo-e "${green_color$1${res}}";;yellow| YELLOW)Echo-e "${yellow_color}$1${res}";;Blue|blue)Echo-e "${blue_color

Color Display and Behavior Control in Shell

The format is as follows: # Echo-e '\ 033 [background color; foreground color; action control M string \ 033 [# m'# Echo-e '\ e [background color; foreground color; action control M string \ e [# m' # Foreground | Background: Color#---------------------------------#30 | 40

Shell output function with color text

Some monitoring scripts or restart services. The failure is successfully output in red or green. A function is used to encapsulate this function. Function: receives string parameters, changes the OK in the received parameter [] to red, and the FAILD to green. For example: Successful: Failed: Let's talk less: directly add the code #!/bin/bashaction(){MSG=$1COLOER=`echo $1|sed 's#^.*\[\(.*\)\].*#\1#g'`BASE=`echo $1|sed 's#\(^.*\)\[.*]#\1#g'`if[ "OK"!= "$COLOER"];thenecho -e "${BASE} [\e[0;31;1

Shell, Python script terminal color output

Tag:pythonshel script 1 format: \033[display mode; foreground color m23 description:4 foreground Background Color Color 5---------------------------------------6 3040 Black 731 41 Red 832 42 Green 933 43 Yellow 1034 44 Blue 113545 Purplish Red 1236 46 Cyan Blue 1337 47 White 14 display mode significance15-------------------------160 Terminal defaul

Shell script programming (strict terminal format control, beautiful output font color)

#!/bin/bash# #下面是字体输出颜色及终端格式控制 # Font Color 30-37ECHO-E "\033[30m black word \033[0m" echo-e "\033[31m red word \033[0m" echo-e "\033[32m green word \ 033[0m "echo-e" \033[33m yellow word \033[0m "echo-e" \033[34m blue word \033[0m "echo-e" \033[35m purple word \033[0m "echo-e" \033[36m sky blue Word \033[0m "Echo-e" \033[37m white word \033[0m "#字背景颜色范围: 40-47echo-e" \033[40;37m black background \033[0m "ECHO-E" \033[41;30m red Bottom black word \033

How to modify the output effect of the Linux shell (interface color)

: Current user's account nameVersion information for \v:bash\w: The full working directory name. Home directory will be replaced by ~\w: Use basename to get the working directory name, so only the last directory is listed\#: The first few commands issued\$: Prompt character, if root, Prompt is: #, normal user is: $\ n: Create a new rowThe font is not limited to one color and can have multiple colors:Ps1= "[\e[32;1m\[email protected]\e[35;1m\h \e[31;1m

Shell Display with color font

Tags: set background color and blue background red character BSP fontFormat: 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

Shell Echo Color Example

#!/bin/bash# Test color for scriptred_color= ' \e[1;31m 'green_color= ' \e[1;32m 'yellor_color= ' \e[1;33m 'blue_color= ' \e[1;34m 'pink= ' \e[1;35m 'res= ' \e[0m 'if [$#-eq 2] Thenecho "Usage: ' basename $ ' content {Red|blue|yellow|pink|res|green}"Exit 1fifunction Echo_color () { Case $ inred| RED)echo-e "${red_color}$1${res}";;green| GREEN)echo-e "${green_color$1${res}}";;yellow| YELLOW)echo-e "${yellow_color}$1${res}";;blue|blue)echo-e "${blue_col

Color style and property control for shell scripts

\033[0m" echo-e "\033[41;37m Red bottom White \033[0m" echo-e "\033[42;37m Green bottom White \033[0m" echo-e "\033[43; 37m Yellow bottom White \033[0m "echo-e" \033[44;37m Blue bottom White \033[0m "echo-e" \033[45;37m purple white \033[0m "echo-e" \033[46;37m Blue Sky White \033[0m "Echo-e" \033[47;30m black character \033[0m "on white background"Last Face Control option description\33[0m Close All properties \33[1m set high brightness \33[4m underline \33[5m flicker \33[7m reverse \33[8m bla

Shell Display with color font

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 col

(go) shell script output with color font

cursor up 4 lines \033[0m" #\033[nc cursor right shifts n rows #\033[nd cursor left n rows #\033[y;xh Setting the cursor position #\033[2j Clear Screen #\033[k clears the contents from the cursor to the end of the line Echo-e "\033[k clear the cursor to the end of the line \033[0m" #\033[s Save Cursor position #\033[u Restore cursor Position #\033[?25| Hide Cursor #\033[?25h Display cursor ECHO-E "\033[?25l hidden cursor \033[0m" ECHO-E "\033[?25h display cur

Let the echo output in the shell script color

Http://www.linuxidc.com/Linux/2014-12/110463.htm#!/bin/bash#定义颜色的变量Red_color= ' \e[1;31m ' #红Green_color= ' \e[1;32m ' #绿Yelow_color= ' \e[1;33m ' #黄Blue_color= ' \e[1;34m ' #蓝pink= ' \e[1;35m ' #粉红res= ' \e[0m '#需要使用echo-EEcho-e "${red_color}======red Color======${res}"Echo-e "${yelow_color}======yelow Color======${res}"Echo-e "${blue_color}======green Color====

Shell Font Color display

Format: "\033[display mode; front color; background color m string \033[0m"\033: Starting an escape sequence[: Start Color definitionThere are several ways to display the method:0 Terminal default settings1高亮显示4使用下划线5闪烁7反白显示8不可见The number of foreground and background colors corresponds to the following:Foreground background c

Color Ball of shell scripts

The first thing to know is how to play color ball: 6 red balls (1~33) and a Blue ball (1~16) to choose a so-called 6+1To generate 6 random numbers between 1~33 and cannot be equal, this is key if you use traditional judging methods (the first with the second ...). The second and third ratio ...), is bound to code will be very long, my idea is: use ${random}% 33 +1, put the 6 red balls in an array of red, using: For J in "${red[@]}";d o echo $J;d one)

Shell Font Color

ECHO-E: Enable conversion of backslash control charactersExample:Echo-e "\033[40;37m Black Bottom white Kongring \033[0m"Echo-e "\033[41;37m Red bottom white Kongring \033[0m"Echo-e "\033[42;37m Green bottom white Kongring \033[0m"Echo-e "\033[43;37m Yellow xxxxx\033[0m"Echo-e "\033[44;37m Blue bottom White xxxxx\033[0m"Echo-e "\033[45;37m Purple xxxxx\033[0m"Echo-e "\033[46;37m sky blue White xxxxx\033[0m"Echo-e "\033[47;30m black character xxxxx\033[0m on white background"Effect:650) this.widt

Total Pages: 15 1 .... 4 5 6 7 8 .... 15 Go to: Go

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.