Skip to content

Instantly share code, notes, and snippets.

@matthewadams
Created August 9, 2017 16:49
Show Gist options
  • Save matthewadams/7d1d1071e1884f2f794bf4d8231a43bc to your computer and use it in GitHub Desktop.
Save matthewadams/7d1d1071e1884f2f794bf4d8231a43bc to your computer and use it in GitHub Desktop.
Bash colorized output functions
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[1;34m'
CLEAR='\033[0;0m'
red() {
printf "${RED}$1${CLEAR}\n"
}
green() {
printf "${GREEN}$1${CLEAR}\n"
}
yellow() {
printf "${YELLOW}$1${CLEAR}\n"
}
blue() {
printf "${BLUE}$1${CLEAR}\n"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment