Enabling Colors in ksh88

I won’t lie. I’m a Linux user. At the very least, I’m a semi-up-to-date 'nix command line user and I work on AIX far more than I’d like. I intend no offense to you AIX guys out there. My frustration with it is primarily korn shell; Others fustrations including the fact that every package IBM releases for it is between 15 to 25 years old, and its ever-leaning tendancies towards non-Unix ways of doing things (eg: smitty, odm, init binaries instead of scripts, etc.).

However, it is what it is. If you like frivolus things such as color in your terminal, you may have noticed that putting it in your .profile doesn’t work super well. It turns out that ksh88 won’t recognize the \e or the \033 characters in place of the actual esc character (no, you’re not doing anything wrong). What you need to do instead is hit the following key sequence in vi to get an actual escape character

  • Go into insert mode

  • Press ctrl+v

  • Hit the escape key on your keyboard

You should now see something like ^[. This represents an escape key press. All of your color-set sequences should be the same right after this character.

For an example, Creating bold text might look like…​

Bold text