![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| change directory using shell script | laxmi | Shell Programming and Scripting | 0 | 01-17-2008 04:12 AM |
| How to change font and colour in mail sent from Unix | yogichavan | HP-UX | 3 | 07-09-2007 03:41 AM |
| #!/bin/sh script is in white colour | MarGur | Shell Programming and Scripting | 1 | 05-11-2007 02:01 PM |
| How to change the font colour in unix ? | sars | Shell Programming and Scripting | 3 | 12-04-2006 07:20 AM |
| change user through shell script | raviraushanjha | UNIX for Dummies Questions & Answers | 0 | 12-12-2005 12:11 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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. |
| Forum Sponsor | ||
|
|
|
#3
|
|||
|
|||
|
HOw to change the text colour through shell script?
Hi,
thnx for ur reply.but what i want to know is how to use these colours implicitly. i dont want to hardcode the colours as like ^[[32m this in the script. is there any way to set this colour in a profile so that the text can be displayed in colour when the script is triggered. Thanx in advance. Sona. |
|
#4
|
||||
|
||||
|
Well yeah!
It's easy as abc Code:
[dot][space] file_with_color_def_inside |
|
#5
|
||||
|
||||
|
Sure u can,
u just have to store them in afile then source that file in your batches like this Code:
[dot][space] /full_path_file_with_color_def_inside . /full_path_file_with_color_def_inside |
|
#6
|
|||
|
|||
|
Hi,
can u give me one example for creating the profile and how can u use that in the script. Also what i need exactly is like for ex we have one script named test.ksh. if i run the script it displays some lines like aaaaaaaaaaaaa bbbbbbbbbbbbb ccccccccccccc in that i want only the second line to be coloured and not all. Pls guide me in doing this.... Sona. |
|
#7
|
||||
|
||||
|
Download my cecho script - will show you the basics. Then it's just hardcoded in one place... chuck it in /usr/local/bin (if that's in your path) and then scripts can just call
cecho red This is in red Cheers ZB |
||||
| Google The UNIX and Linux Forums |