How to change the font colour in unix ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to change the font colour in unix ?
# 1  
Old 11-30-2006
Lightbulb How to change the font colour in unix ?

Could you pls tell me how to change the font colour in unix ?
What is the syntax ?
# 2  
Old 11-30-2006
Hi,

Try the following syntax :
FGRED=`echo "\033[31m"`
FGCYAN=`echo "\033[36m"`
BGRED=`echo "\033[41m"`
FGBLUE=`echo "\033[35m"`
NORMAL=`echo "\033[m"`

and after :
echo "${FGBLUE} Text in blue ${NORMAL}"
echo "Text normal"
echo "${BGRED} Background in red"
etc...

echo "${FGBLUE} Text in blue ${NORMAL}"
This User Gave Thanks to madmat For This Post:
# 3  
Old 11-30-2006
what does the \033 mean

Thanks

Mervin
# 4  
Old 12-04-2006
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Change font

how do i change from employee= to employee= in ksh. in my shell script, i just want to employee= to BOLD. (3 Replies)
Discussion started by: lawsongeek
3 Replies

2. Shell Programming and Scripting

sed colour change

Hi, I am trying to write a script which will email a backup report from the server, The contents of the email will be: ---------------------- ---- -- ---- ----- ---- ------- ---- ------- ------- | | | | |Chnge|Wkng| | | | | | ... (6 Replies)
Discussion started by: Bdoydie
6 Replies

3. AIX

putty background colour change in vi editor

Hello, I have a problem with my putty session when i use the vi editor or when i do dbaccess on an Informix database. Suddenly the background and foreground colour of my terminal change and it makes it difficult for me to see whats on the screen. Why this is happening? Is there a way to keep... (2 Replies)
Discussion started by: omonoiatis9
2 Replies

4. Programming

Cshell help with change colour in print

i want to ask how to change the colour of prompt message from use? and also how to change colour in printing........ i want to change it as blue colour and red colour, but i found many website still don't know how to do. how's the command is wrote? thz really!! (1 Reply)
Discussion started by: wendy1089
1 Replies

5. Shell Programming and Scripting

Font change in unix while sending email

Hi, I know that we would be require HTML to change the font and color of the text of the output, if we wnt to send that through the email. But I have managed to get below code, can someone look into it and let me know if i can acheive my requirement through this kind of code: Following can... (9 Replies)
Discussion started by: amit.mathur08
9 Replies

6. Shell Programming and Scripting

how to change font in mailx

I am writing sql reports to an oracle database, spooling them to a file and emailing them with mailx. I use the syntax below. The reports do not format properly, unless I use the Courier New font. How do I set this with mailx? mailx -s "MY REPORT, `date +'%D %r` " -r "REPORTING SYSTEM"... (2 Replies)
Discussion started by: guessingo
2 Replies

7. UNIX for Advanced & Expert Users

To change the colour of the content in email sent through unix

Hi I want to change the color of the email content sent through unix. I tried a lot and left in vain. I heard that it could be done by sending the email as HTML. But I don't how to do it. Can you all share your ideas? ~sakthifire (1 Reply)
Discussion started by: sakthifire
1 Replies

8. Shell Programming and Scripting

ksh, font colour

hi all, how do i change the colour of text if i am using printf ?? in my script i am printing out response times from the server and i wanted to print out the max response time in red. ta. (1 Reply)
Discussion started by: cesarNZ
1 Replies

9. HP-UX

How to change font and colour in mail sent from Unix

Dear All, We have following code to send mails from unix to users. We want to see few sentences of mail in bold font or to hightlight few lines in different colours. Could you please let me know how can we do it in function construct_body. ... (3 Replies)
Discussion started by: yogichavan
3 Replies

10. UNIX for Dummies Questions & Answers

HOw to change the text colour through shell script?

Hi all, I have written one script. If i run the script, particular text in that script needs to be displayed in color.how this could be done?any commands r there to change the colour of the text while running the script? Ur help is appreciated !!! Thanx in Advance, Sona. (7 Replies)
Discussion started by: Sona
7 Replies
Login or Register to Ask a Question