Skip to content

Instantly share code, notes, and snippets.

@nick3499
Created February 21, 2017 15:32
Show Gist options
  • Save nick3499/402a6d7dccd474f2bdb679f4311b1238 to your computer and use it in GitHub Desktop.
Save nick3499/402a6d7dccd474f2bdb679f4311b1238 to your computer and use it in GitHub Desktop.
Bash: tput, setaf, echo: Set Terminal Foreground Color
#!/bin/bash
tput setaf 0
echo "BLACK FOREGROUND"
tput setaf 1
echo "RED FOREGROUND"
tput setaf 2
echo "GREEN FOREGROUND"
tput setaf 3
echo "YELLOW FOREGROUND"
tput setaf 4
echo "BLUE FOREGROUND"
tput setaf 5
echo "MAGENTA FOREGROUND"
tput setaf 6
echo "CYAN FOREGROUND"
tput setaf 7
echo "WHITE FOREGROUND"
sleep 5
tput reset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment