Bash ansi escape codes
From wikinotes
Terminals are controled ansi escape sequences.
These sequences vary from terminal to terminal.
The tput command uses your terminal's termcap library to expose a common interface.
Colours
See list of colours https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit
echo -e '\e[32m' # echo -e '\e[m' # reset colour tput setab 7 # set bg colour tput setaf 7 # set fg colour tput bold # set bold tput sgr0 # reset colours yellow=$(tput setaf 3) echo "${yellow}foo"