nick34992
2/21/2017 - 3:32 PM

Bash: tput, setaf, echo: Set Terminal Foreground Color

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