Skip to content

Instantly share code, notes, and snippets.

@tonetheman
Created August 14, 2013 14:36
Show Gist options
  • Select an option

  • Save tonetheman/6231652 to your computer and use it in GitHub Desktop.

Select an option

Save tonetheman/6231652 to your computer and use it in GitHub Desktop.
#!/bin/bash
NORMAL=$(tput sgr0)
GREEN=$(tput setaf 2; tput bold)
RED=$(tput setaf 1)
YELLOW=$(tput setaf 3)
function red() {
echo -e "$RED$*$NORMAL"
}
function yellow() {
echo -e "$YELLOW$*$NORMAL"
}
function green() {
echo -e "$GREEN$*$NORMAL"
}
green "[ok] - this should be green"
echo "[ok] - this should be normal"
yellow "[warn] - this is a warning"
red "[err] - this is an error"
echo "[ok] - back to normal"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment