Skip to content

Instantly share code, notes, and snippets.

@alademann
Created January 24, 2014 16:43
Show Gist options
  • Select an option

  • Save alademann/8601070 to your computer and use it in GitHub Desktop.

Select an option

Save alademann/8601070 to your computer and use it in GitHub Desktop.
Bash Script Formatting
#!/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