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?
red='\e[0;31m' NC='\e[0m' # No Color echo -e "${red}Hello Stackoverflow${NC}"
This answer correct, except that the call to colors should not be inside the quotes.
echo -e ${red}"Hello Stackoverflow"${NC}
Should do the trick.