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?
Use tput with the setaf capability and a parameter of 1.
tput
setaf
1
echo "$(tput setaf 1)Hello, world$(tput sgr0)"