How to give color and space?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to give color and space?
# 1  
Old 05-10-2013
Oracle How to give color and space?

I have write one scripts,i want give the color for only one line and give the space for 2line. how to give the color and space of line....
# 2  
Old 05-10-2013
for coloring you can use below and i didnt get what you mean by space? you mean blank/new line?

Code:
 
echo "\033[1;43m ANYTHING HERE \033[m"

# 3  
Old 05-10-2013
Oracle

I want to give new line.
# 4  
Old 05-10-2013
Hi vidyadhar85...

Your code should read:-
Code:
echo "\033[1;43m ANYTHING HERE \033[0m"

Hi rajivgandhi...

To save me writing reams a good starting point:-
(Note not all terminals do all the available ANSI escape codes...)

Code:
http://en.wikipedia.org/wiki/ANSI_escape_code

CYA...
# 5  
Old 05-10-2013
[QUOTE=wisecracker;302805323]Hi vidyadhar85...

Your code should read:-
Code:
echo "\033[1;43m ANYTHING HERE \033[0m"

QUOTE]
Have you tried it and then concluded its not working?? It works really fine on AIX atleast..
# 6  
Old 05-10-2013
Hi vidyadhar85...

Where have I quoted that it didn't work?

The 0, zero, IS defined in the ANSI structure to RESET ALL attributes.

Pointless having industry standards if you are not going to teach the person the right way...
# 7  
Old 05-10-2013
on most of the systems ,it should be
Code:
echo -e


Code:
echo -e "\033[1;43m ANYTHING HERE \033[0m"

Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Color encoding on the disk space script

Hi All, Hope all are doing good!! Am glad that i have utilized some ideas and written a code to make the disk space result comes better and it was successfully running in the production. The next update from my manager was to make this code to come in a table format with color added. 1)... (28 Replies)
Discussion started by: Kalaihari
28 Replies

2. Shell Programming and Scripting

function terminating if i give input as space or no input and enter

HI i have written a script to ask input from the user. this script should promote the user for y/n input. if user enters anyother input then y/n the script promotes him again. this below code is working fine for all the cases. except for space and enter " if i give space and enter it is... (2 Replies)
Discussion started by: BHASKARREDDY006
2 Replies

3. Emergency UNIX and Linux Support

Disk space script output in color

I'm connecting to 15 servers in using ssh and storing disk space details of each server in a text file Finally , I'm emailing that text file at the particular id using mail -x . The report looks something like this. Filesystem size used avail capacity Mounted on /proc ... (30 Replies)
Discussion started by: ajaypatil_am
30 Replies

4. Shell Programming and Scripting

Give user 5 chances to guess my favorite color

I wrote a script to give a user 5 guesses on what is my favorite color but I it doesn't work. I've only been scripting for a couple weeks and need some help it seems simple but how do I give the user 5 guesses? (3 Replies)
Discussion started by: noob
3 Replies

5. Shell Programming and Scripting

give some color to a word on echo output

Hi Supposed this text output: How can I show $HOSTNAME in other color than blank? :-) KSH on AIX (4 Replies)
Discussion started by: iga3725
4 Replies
Login or Register to Ask a Question