您好,登錄后才能下訂單哦!
1 想必大家都想在寫腳本執行的時候,有醒目的提示顏色吧,貢獻我收集的華麗的色值表。 #!/bin/bash #======================================================================================= # FILE: Colourful.sh # USAGE: bash Colourful.sh |sh Colourful.sh # DESCRIPTION: Print World Colour. # OPTIONS: see fuction 'usage' below # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Dr.-Vision. Simple(sp) # COMPANY: China # VERSION: 1.0 # CREATED: 12.07.2015 - 10:15:30 # REVISION: 12.07.2015 # PROJECT: XXX # COPYRITHT: Copyright(c)2002-2020 Shell, All Rights Reserved #======================================================================================= # Shell Var Here # Function comments #=== FUNCTION ==================================================================== # NAME: Colourful_Style # DESCRIPTION: 打印Shell的色值表. # PARAMETER 1: --- #======================================================================================= function Colourful_Style { printf "======================== 華麗的色值表 Style 1 ========================\n\n" for ((style=0;style<=7;style++)) { for ((fg=30;fg<=37;fg++)) { for ((bg=40;bg<=47;bg++)) { #echo $style $fg $j crt="\033[${style};${fg};${bg}m" printf "${crt}" printf "%s" "sg:${style}-fg:${fg}-bg:${bg}" printf "\033[0m" } printf "\n" } printf "\n" } printf "======================== 華麗的色值表 Style 2 ========================\n\n" for ((STYLE=0;STYLE<=7;STYLE++)) { for ((FG=30;FG<=37;FG++)) { for ((BG=100;BG<=107;BG++)) { #echo $style $fg $j CRT="\033[${STYLE};${FG};${BG}m" printf "${CRT}" printf "%s" "STY:${STYLE}-cFG:${FG}-cBG:${BG}" printf "\033[0m" } echo } echo } } # Section comments #--------------------------------------------------------------------------------------- # define main. #--------------------------------------------------------------------------------------- Colourful_Style # line end comments
結果如下:
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。