Shell: February 2016 Archives

Shell Color Output

user-pic
Vote 0 Votes

tput sgr0 # default terminal
tput setab [1-7] # Set the background color
tput setaf [1-7] # Set the foreground color

color is
0 black
1 red
2 green
3 yellow
4 blue
5 magenta
6 cyan
7 white

e.g. color output in red
# echo "`tput setaf 1`Red Color`tput sgr0`"
Red Color

ref. How to change the output color of echo in Linux

Recent Entries

About this Archive

This page is an archive of entries in the Shell category from February 2016.

Shell: January 2016 is the previous archive.

Shell: April 2016 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives