Ad

andrew
asked May 04 2017
Answer
Jus use -e option in echo command as follows,
To display output in green color,
# echo -e "\033[32m hello world"
Other color codes as follows,
Black 30
Red 31
Green 32
Yellow 33
Blue 34
Magenta 35
Cyan 36
White 37
Note: \033[ is default, change 32 to other codes.

jagannatharumugam
asked May 04 2017
edited Oct 05 2018
How to print message from echo command with color
I print the message using echo command. But, is it possible to view it in various color formats.