0

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.

andrew
asked May 3, 2017
1 Answer
0

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.

View More
jagannatharumugam
answered May 4, 2017
Your Answer
||||
 
100:0