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?
To expand on this answer, for the lazy of us:
function echocolor() { # $1 = string COLOR='\033[1;33m' NC='\033[0m' printf "${COLOR}$1${NC}\n" } echo "This won't be colored" echocolor "This will be colorful"