1、输出字体颜色库

#!/bin/bash

export black='\E[0m\c'
export boldred='\E[1;31m\c'
export boldgreen='\E[1;32m\c'
export boldyellow='\E[1;33m\c'
export boldblue='\E[1;34m\c'
export boldmagenta='\E[1;35m\c'
export boldcyan='\E[1;36m\c' c_notify=$boldgreen #通过变量来修改颜色
c_error=$boldred cecho()
{
message=$
color=${:-$black} echo -e "$color"
echo -e "$message"
tput sgr0 # Reset to normal.
echo -e "$black"
return
} cecho "1. #################" $boldred
cecho "2. #################" $boldgreen
cecho "3. #################" $boldyellow
cecho "4. #################" $boldblue
cecho "5. #################" $boldmagenta
cecho "6. #################" $boldcyan cecho "启动成功" $c_notify
cecho "启动失败" $c_error

输出效果:

最新文章

  1. PIC10F200/202/204/206/220/222/320/322芯片解密程序复制多少钱?
  2. sudo apt-get install apache2 php7.0 php7.0-mysql mysql-server
  3. 【Alpha】团队贡献分配计划
  4. Java数据库——CallableStatement接口
  5. wordpress如何批量关闭旧日志留言功能
  6. How to mount a NFS share?
  7. Design Patterns---- Strategy 模式
  8. 在windows下使用linux的开发环境
  9. C#路径/文件/目录/I/O常见操作汇总<转载>
  10. struts2 模型驱动的action赋值优先顺序
  11. Android UI - 实现广告Banner旋转木马效果
  12. iOS 导航栏去阴影
  13. 基于requirejs和angular搭建spa应用
  14. Docker rancher 部署
  15. day 21 内存管理,正则
  16. day 7 -1 进程理论知识
  17. liunx中的iptables
  18. 每天学习一个Linux命令-目录
  19. [yum] yum使用光盘安装或更新软件
  20. Linux基础命令---文本格式转换fmt

热门文章

  1. 微信小程序之加载更多(分页加载)实例
  2. N+1:创新点的设计
  3. jquery通过索引获取元素
  4. Assertion failure in UITableViewCell layoutSublayersOfLayer解决办法
  5. 使用 GNU autotools 改造一个软件项目
  6. 利用AngularJS实现一个单页应用
  7. T4生成整理
  8. SqlServer 动态SQL(存储过程)中Like 传入参数无正确返回值的问题
  9. F4帮助
  10. vue.js与后台模板引擎“双花括号”冲突时的解决办法