I am trying to print a text in the terminal using echo command.
I want to print the text in a red color. How can I do that?
Here is the simplest and readable solution. With bashj (https://sourceforge.net/projects/bashj/), you would simply choose one of these lines:
#!/usr/bin/bash
W="Hello world!"
echo $W
R=130
G=60
B=190
echo u.colored($R,$G,$B,$W)
echo u.colored(255,127,0,$W)
echo u.red($W)
echo u.bold($W)
echo u.italic($W)
Y=u.yellow($W)
echo $Y
echo u.bold($Y)
256x256x256
colors are available if you have the color support in your terminal application.