Skip to content

Instantly share code, notes, and snippets.

@saksmt
Created September 1, 2014 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saksmt/aac34dcfe0c5e94ce611 to your computer and use it in GitHub Desktop.
Save saksmt/aac34dcfe0c5e94ce611 to your computer and use it in GitHub Desktop.
Bash color variables
#!/bin/bash
esc=`echo -en "\033"`
clr="${esc}[0m"
bright="${esc}[1m"
black="${esc}[30m"
red="${esc}[31m"
green="${esc}[32m"
brown="${esc}[33m"
blue="${esc}[34m"
violet="${esc}[35m"
cyan="${esc}[36m"
white="${esc}[37m"
yellow="${bright}${brown}"
info=" ${cyan}*${clr} "
success=" ${green}*${clr} "
error=" ${red}*${clr} "
warning=" ${yellow}*${clr} "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment