Console Control Characters

Aus DL8RDS Wiki
Wechseln zu: Navigation, Suche

This is just a public notepad.

Here is what I have found: Colored text in console output is not that difficult :-)

echo -e "This will be \033[31mred\033[0m."

Here is a list of some important codes:

\033[0m	reset all attributes
\033[1m	bold
\033[4m	underlign
\033[5m	blink
\033[7m	inverse
\033[30m	text color black
\033[31m	text color red
\033[32m	text color green
\033[33m	text color yellow
\033[34m	text color blue
\033[35m	text color magenta
\033[36m	text color purple
\033[37m	text color white
\033[40m	background color black
\033[41m	background color red
\033[42m	background color green
\033[43m	backround color yellow
\033[44m	background color blue
\033[45m	background color magenta
\033[46m	background color purple
\033[47m	background color white

References: