Join the Stack Overflow Community
Stack Overflow is a community of 6.3 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

This question already has an answer here:

I have a file with this line for example :

${blue}*Passed*${NC}: check the command line ...

I can read in bash this line :

red='\e[41m'
blue='\e[1;34m'
purple='\e[1;31m'
NC='\e[0m' # No Color

 while read line
 do
      echo -e $line
 done < test_contest

But the output is like this :

${blue}Passed${NC}: check the command line ...

there is no color, can bash interpret this line to output color ?

share|improve this question

marked as duplicate by chepner bash Oct 22 '14 at 13:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 1 down vote accepted

Just change:

echo -e $line

With:

eval echo -e \"$line\"
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.