Sponsored Content
Full Discussion: Colors not being Interpreted
Top Forums UNIX for Dummies Questions & Answers Colors not being Interpreted Post 302849707 by Pedro72 on Tuesday 3rd of September 2013 04:44:49 AM
Old 09-03-2013
RedHat Colors not being Interpreted

Hello, I am having an issue with ANSI colors in Redhat linux.

I am running a script where the colours have been set very early on as follows:
Code:
# Reset
Color_Off='\033[0m'       # Text Reset

# Regular Colors
Black='\033[0;30m'        # Black
Red='\033[0;31m'          # Red
Green='\033[0;32m'        # Green
Yellow='\033[0;33m'       # Yellow
Blue='\033[0;34m'         # Blue
Purple='\033[0;35m'       # Purple
Cyan='\033[0;36m'         # Cyan
White='\033[0;37m'        # White

# Bold
BBlack='\033[1;30m'       # Black
BRed='\033[1;31m'         # Red
BGreen='\033[1;32m'       # Green
BYellow='\033[1;33m'      # Yellow
BBlue='\033[1;34m'        # Blue
BPurple='\033[1;35m'      # Purple
BCyan='\033[1;36m'        # Cyan
BWhite='\033[1;37m'       # White

Later in the script these are used to color define sections of output by reffering to them using:
Code:
 ${White} blah blah blah ${Color_off}

Now this works fine on an AIX server I have already deplyed this too, but Redhat seems not to interpret these codes as the output is for example:
Code:
\033[0;37m blah blah blah \033[0m

The script runs in korn shell (ksh) and I have tried running it as bash although it breaks some other parts of the script and does not help with the color issue.

Has anyone experienced this or have any possibly solutions for me?
(Apart from removing the color coding as this is my backup option)
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

colors

Hello, I am somewhat new to linux. I just installed Red Hat 7.2 and when I try to load gnome or KDE in colors above 8bit it will kind of lock up and display some wierd scrambled cable look. I have an ATI Radeon 7000. I check out my monitor settings they are fine. Is it the graphics card? I set my... (1 Reply)
Discussion started by: Sage3k
1 Replies

2. Solaris

Console colors

Guys i used to the black background in BSD, now im using Sun Solairs, how can i change the background and font colors in console ?, i heard about setterm but i didnt get the right syntax, any ideas ? (5 Replies)
Discussion started by: XP_2600
5 Replies

3. Linux

linux colors

what dog gone file is setting these colors! i dont see it in bashrc or bash_profile!! anyone know? alias cp='cp -i' alias l.='ls -d .* --color=tty' alias ll='ls -l --color=tty' alias ls='ls --color=tty' alias mv='mv -i' alias rm='rm -i' alias vi='vim' alias which='alias | /usr/bin/which... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

4. UNIX for Dummies Questions & Answers

Directory colors

Hey guys, When I used a Solaris box way back I had directory, file , symbolic link colors, etc... I can't seem to find the .dircolors file and how i set it up for bash on Solaris... anyone remember how to do it? Thanks! (2 Replies)
Discussion started by: kingdbag
2 Replies

5. UNIX for Dummies Questions & Answers

Colors

Is there a way with the bourne shell to have different types of files show up a different color when you do ls? (1 Reply)
Discussion started by: resullivan
1 Replies

6. Shell Programming and Scripting

using colors in mailx

I want to use notify_fail () { echo " " >> ${MSG} echo " Script failed n">> ${MSG} cat ${MSG}|mailx -s "t1.ksh Success: "name@domain.com" exit 1 } I want script failed to show in Red or different colors in the email that i sent to name@domain.com I serached several sites and also... (1 Reply)
Discussion started by: konark
1 Replies

7. HP-UX

Vim colors in HP-UX

I am using xterm on my HP-UX system (11i). Color is working in xtrem, i can see that with the -color option on ls. When I use vim's syntax high lighting, instead of colors, it uses underline and bold (which looks horrible). I added the following if &term =~ "xterm" if has("terminfo") ... (2 Replies)
Discussion started by: kheisler
2 Replies

8. Shell Programming and Scripting

awk print: howto single quote not interpreted!?

cat a | awk -F";" '{print "update db set column=' "$2" ' where column1=\""$1"\";"}' > ip-add.sql Hi! I'm a new user! i need to use single quote in the double quotes print string The apex between che "$2" should not be interpreted, but....how?! I'm trying to use \ but don't work correctly! ... (4 Replies)
Discussion started by: Re DeL SiLeNziO
4 Replies

9. Shell Programming and Scripting

Problem with eval a generated and interpreted variable name and its value

Heya I have modified $HOME/.config/user-dirs.dirs to my like and the variables are properly 'structured' (XDG_XY_DIR="$HOME/YZ"). Now since i wrote a script to do that part, i currently stuck at the part to create a new .gtk-bookmarks file. Regarding code snippet: (bold part beeing... (2 Replies)
Discussion started by: sea
2 Replies

10. Programming

Ncurses colors

I am using ncurses to develop a user interface. Perhaps I should be using something else, but I am reasonably comfortable with ncurses and don't really want to climb another learning curve at this time. One problem I have dealt with for many years is ncurses' colors. I have simply been... (23 Replies)
Discussion started by: BillLee
23 Replies
desktop_palette(3alleg4)					  Allegro manual					  desktop_palette(3alleg4)

NAME
desktop_palette - The palette used by the Atari ST low resolution desktop. Allegro game programming library. SYNOPSIS
#include <allegro.h> extern PALETTE desktop_palette; DESCRIPTION
The palette used by the Atari ST low resolution desktop. I'm not quite sure why this is still here, except that the grabber and test pro- grams use it. It is probably the only Atari legacy code left in Allegro, and it would be a shame to remove it :-) The contents of this palette are 16 colors repeated 16 times. Color entry zero is equal to color entry 16, which is equal to color entry 24, etc. Index Color RGB values 0 White 63 63 63 1 Red 63 0 0 2 Green 0 63 0 3 Yellow 63 63 0 4 Blue 0 0 63 5 Pink 63 0 63 6 Cyan 0 63 63 7 Grey 16 16 16 8 Light grey 31 31 31 9 Light red 63 31 31 10 Light green 31 63 31 11 Light yellow 63 63 31 12 Light blue 31 31 63 13 Light pink 63 31 63 14 Light cyan 31 63 63 15 Black 0 0 0 SEE ALSO
default_palette(3alleg4), black_palette(3alleg4) Allegro version 4.4.2 desktop_palette(3alleg4)
All times are GMT -4. The time now is 03:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy