Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am about to write a shell script. I would like to be able to visually distinguish some of its output text as a warning, by setting its color to yellow.

How is this done?

share|improve this question
up vote 7 down vote accepted

From "Shell colors: colorizing shell scripts":

echo -e "\033[33mThis is yellow\033[0m"


echo -e "\e[33mThis is yellow\e[0m"

\033 or \e as an Escape character starts the escape sequence, which in this case contains the controls to change colors.

share|improve this answer
Thanks for the update @slhck, it provided a more complete answer ;) – Linus Unnebäck Sep 5 '11 at 20:53
The link leads to a page which is quite unusable (blocked by adds...) – Mike Aski Jun 16 '13 at 6:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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