Created
May 17, 2014 19:44
-
-
Save mhammonds/f76f8d3e988861a39adf to your computer and use it in GitHub Desktop.
Demo: Color Output From Bash Script on Linux
This file contains hidden or 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
| #!/bin/bash | |
| # This script is a simple demo showing | |
| # how to color output from a bash script. | |
| green='\e[0;32m' | |
| red='\e[0;31m' | |
| NC='\e[0m' #No Color | |
| echo -e " | |
| ${green}This is green text. | |
| ${red}This is red text. | |
| ${NC}This is normal/non-colored text. | |
| " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment