I'm on Bash and I want to display, some colored text onscreen.
I gave
Code: Select all
CYAN='\033[0;36m'
Code: Select all
LPURPLE='\033[1;35m'
(First is for Cyan and later for the Light Purple ASCII colors).
Then giving:
Code: Select all
echo -e "${CYAN}This is a ${LPURPLE}nice${CYAN}, colored text."
So far, so good!
The problem is, that giving the above command from inside a script file, outputs the same string, but without any coloring. All characters are white.
Any thoughts?
Of course one can achieve the desired (colored) output, with the help of a computer language. (I did it with FreeBASIC, but naturally any language will do).
I'm just curious why the above mentioned command didn't work.
PS. I also tried with printf (instead of echo), with similar results.
TIA!
M.