Skip to content

Instantly share code, notes, and snippets.

@bitkevin
Created July 23, 2013 09:18
Show Gist options
  • Save bitkevin/6061103 to your computer and use it in GitHub Desktop.
Save bitkevin/6061103 to your computer and use it in GitHub Desktop.
#! /bin/bash
# test
echo -e "\033[31m[FAIL]\033[0m hello world"
# \033[0m 关闭所有属性
# \033[1m 设置高亮度
# \033[4m 下划线
# \033[5m 闪烁
# \033[7m 反显
# \033[8m 消隐
# \033[30m----\33[37m 设置前景色
# \033[40m----\33[47m 设置背景色
# \033[nA 光标上移n行
# \033[nB 光标下移n行
# \033[nC 光标右移n行
# \033[nD 光标左移n行
# \033[y;xH 设置光标位置
# \033[2J 清屏
# \033[K 清除从光标到行尾的内容
# \033[s 保存光标位置
# \033[u 恢复光标位置
# \033[?25l 隐藏光标
# \033[?25h 显示光标
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment