I've recently been working on a script to backup files, etc. for my own use but recently I thought it may look nicer if I was able to cleanup and have everything nice and tidy (with colours and what not). I was unable to complete this though. In a shell script I have written the following and despite what multiple combos I've tried I am unable to get this working.

Testing this on Mavericks as I can't update to Yosemite yet.

echo '\033Some text'

Can somebody shine a light on this?

1 Answer 1



echo $'\e[34m''some text'


echo $(tput setaf 1) some text

For more detailed information, see this post: https://superuser.com/questions/33914/why-doesnt-echo-support-e-escape-when-using-the-e-argument-in-macosx

  • To no avail, still is a pure white text.
    – James
    Mar 25, 2015 at 3:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .