Created
January 24, 2014 16:43
-
-
Save alademann/8601070 to your computer and use it in GitHub Desktop.
Bash Script Formatting
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 | |
| # Formatting options | |
| underline=`tput smul` | |
| nounderline=`tput rmul` | |
| bold=`tput bold` | |
| red=`tput setaf 1` | |
| green=`tput setaf 2` | |
| normal=`tput sgr0` | |
| ### | |
| # Example Usage | |
| ### | |
| echo "${red}ERROR: Something${normal}" | |
| echo "${underline}A string you\'d like to underline${nounderline}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment