Shell的一些颜色

10 05月
作者:PK|分类:工作
有时候shell输出想增加点颜色,更加醒目 ![](https://www.laomm.com/zb_users/upload/2018/05/201805310957066990001.png) ```bash #!/bin/bash BLK='\E[1;30m' RED='\E[1;31m' GRN='\E[1;32m' YEL='\E[1;33m' BLU='\E[1;34m' MAG='\E[1;35m' CYN='\E[1;36m' WHI='\E[1;37m' DRED='\E[0;31m' DGRN='\E[0;32m' DYEL='\E[0;33m' DBLU='\E[0;34m' DMAG='\E[0;35m' DCYN='\E[0;36m' DWHI='\E[0;37m' RES='\E[0m' echo -e " 01- ${BLK} BLK ${RES} " echo -e " 02- ${RED} RED ${RES} " echo -e " 03- ${GRN} GRN ${RES} " echo -e " 04- ${YEL} YEL ${RES} " echo -e " 05- ${BLU} BLU ${RES} " echo -e " 06- ${MAG} MAG ${RES} " echo -e " 07- ${CYN} CYN ${RES} " echo -e " 08- ${WHI} WHI ${RES} " echo -e " 09- ${DRED} DRED ${RES} " echo -e " 10- ${DGRN} DGRN ${RES} " echo -e " 11- ${DYEL} DYEL ${RES} " echo -e " 12- ${DBLU} DBLU ${RES} " echo -e " 13- ${DMAG} DMAG ${RES} " echo -e " 14- ${DCYN} DCYN ${RES} " echo -e " 15- ${DWHI} DWHI ${RES} " ```
浏览1603 评论0
返回
目录
返回
首页
《白鹿原》读书笔记 PostgreSQL9.6.2升级至PostgreSQL10.4