Last active
September 20, 2018 09:59
-
-
Save SkypLabs/4775d15424f68d16fbdee5818917072c to your computer and use it in GitHub Desktop.
Bash functions to display messages with color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Green | |
function echo_ok { | |
echo -e "\033[32m[OK]\033[0m $@" | |
} | |
# Red (using strerr as output) | |
function echo_err { | |
echo -e "\033[31m[ERROR]\033[0m $@" 1>&2 | |
} | |
# Orange | |
function echo_war { | |
echo -e "\033[33m[WARNING]\033[0m $@" | |
} | |
# Blue | |
function echo_info { | |
echo -e "\033[34m[INFO]\033[0m $@" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment