I have this piece of code below:
echo \" \\033[33mTitle of the Program\\033[0m\"
which changes the colour to yellow.
How can I make the text
-e
if it's not working without itYou may need to add the -e
option to echo
(at least that's required on all or most systems I use). The following will tell your system to blink the text:
echo -e "\033[5mTitle of the Program\033[0m"
And you don't have to choose either yellow or blinking. You can have your cake and eat it too:
echo -e "\033[33;5mTitle of the Program\033[0m"
Your system may ignore the blink code—this appears to be quite common. If you want to make the text prominent, but blinking is being ignored, you can instead invert the colors with 7
:
echo -e "\033[33;7mTitle of the Program\033[0m"
Or you can use blinking and inversion of colors (and yellow):
echo -e "\033[33;5;7mTitle of the Program\033[0m"