Recently in a script I am trying to coloured text in one of the script.
I have been tried couple of ways, failed initially and at the end I got solution.
Content of my script color.sh is following:
echo -e "\e[0;32;47m Hello World \e[0m"
After running the script the expected output in Gray background and text is in parrot green colour.
When I ran command sh color.sh output is:
-e \e[0;32;47m Hello World \e[0m
The output here is as not expected, reason I fond is shell wont support the coloured text.
Now I ran the command bash color.sh and the output is appeared as expected.