08-29-2003
740,
3
Join Date: Jul 2002
Last Activity: 17 June 2009, 5:17 PM EDT
Location: Atlanta
Posts: 740
Thanks Given: 0
Thanked 3 Times in 2 Posts
For example, when setting your PS1 variable (sets your command line prompt) you can type:
PS1="^[[7mMyPrompt^[[0m:"
ESC[7m portion turns on the option and [0m: portion turns off the option. This works in Linux and I know the underlining works in HPUX. Havent really fooled around with this too much. Look up vi escape sequences for more information.
Note: the caret + bracket sequence is actually 1 character, not 2. You have to type cntrl-v + ESC to get this sequence. Its not the same as simply entering in shift-6 + [
[7m turns on reverse video
[5m Blinks
[4m Underlines
Last edited by google; 08-30-2003 at 08:46 AM..