Skip to content

Instantly share code, notes, and snippets.

@eager
Created October 25, 2011 20:17
Show Gist options
  • Save eager/1314108 to your computer and use it in GitHub Desktop.
Save eager/1314108 to your computer and use it in GitHub Desktop.
Bash colorized outputs
#!/bin/bash
# Text color variables
txtund=$(tput sgr 0 1) # Underline
txtbld=$(tput bold) # Bold
txtred=$(tput setaf 1) # Red
txtgrn=$(tput setaf 2) # Green
txtylw=$(tput setaf 3) # Yellow
txtblu=$(tput setaf 4) # Blue
txtpur=$(tput setaf 5) # Purple
txtcyn=$(tput setaf 6) # Cyan
txtwht=$(tput setaf 7) # White
txtrst=$(tput sgr0) # Text reset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment