How to bold, blink, italicise words using echo command?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to bold, blink, italicise words using echo command?
# 1  
Old 07-13-2010
How to bold, blink, italicise words using echo command?

Hello Everyone.

I am trying to bold, blink, italicise words using echo command. As per the research I did, it says to use the following escape code to get the effects.

Code:
#!/bin/bash
clear
echo -e "\033[1m Hello World"
 # bold effect
echo -e "\033[5m Blink"
       # blink effect
echo -e "\033[0m Hello World"
 # back to noraml

However when I am compiling I am not getting the desired effect.

Can anyone please let me know what is the escape code to bold, blink, italicise words using echo command?

Thank you.

---------- Post updated at 09:56 PM ---------- Previous update was at 08:00 PM ----------

Can anyone please help me out..??
Please.......
# 2  
Old 07-13-2010
The codes you are using are correct.

What type of terminal are you using?
# 3  
Old 07-13-2010
You might want to consider using 'tput' instead - 'man tput'.
# 4  
Old 07-13-2010
Quote:
Originally Posted by vgersh99
You might want to consider using 'tput' instead - 'man tput'.
Smilie

I remember some interesting discussions I had when suggesting that... but it seems to work more than the other one!

Here's one
# 5  
Old 07-13-2010
Thanks for the reply..

I really dont know what terminal your are talking about..

You mean which flavour of LINUX am I using?

If you mean flavour, then I would say That I am using RedHat Linux.

Please let me know...
# 6  
Old 07-13-2010
Hi.

I meant which terminal software are you using.

If you're trying it from the text console (i.e. not from X) then it won't (doesn't) work.

The tput option does work.

Everywhere else I've tried it (from a graphical environment) the \033 code works.
# 7  
Old 07-13-2010
Well then if thats the case then I am using text console...

Anyways thanks for your help :-)

I'll check it out and let you know tomorrow.

Thank you once again.

Regards.
G Ravi Chandran
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Hardware

Sun T2000 activity LED in slow blink even though Domain is up

Hello All I have a SunFire T2000 running f/w 6.3.2 The activity led is in slow blink mode. this typically indicates that the domain is down, however it is up and running. I had this issue before and resetting the sc fixes the issue, but now it has come back. showfaults from the sc indicatess... (1 Reply)
Discussion started by: gls5161
1 Replies

2. Shell Programming and Scripting

Need to echo command successful if command is executed successfully

Hello, I have written a command n shell script : srvctl relocate service -d t1 -s s1 -i i1 -t t1 -f If the above command executes successfully without error I need to echo "Service relocated successfully and If it errors out I need to trap the errors in a file and also need to make... (1 Reply)
Discussion started by: Vishal_dba
1 Replies

3. Solaris

[solved] How to blink faulty disk in Solaris hardware?

Hi Guys, One of two disks in my solaris machine has failed, the name is disk0, this is SUN physical sparc machine But I work remotely, so people working near that physical server are not that technical, so from OS command prompt can run some command to bink faulty disk at front panel of Server.... (9 Replies)
Discussion started by: manalisharmabe
9 Replies

4. Shell Programming and Scripting

What does following echo command do?

Can anybody tell me what does following command do? # echo gsoc1 | ./configure_cmd.sh Regards, akash mahakode (1 Reply)
Discussion started by: akash_mahakode
1 Replies

5. Shell Programming and Scripting

how to BLINK on terminal???

hello sir, I want to blink a given text on the screen. I tried using the following :- I also used :- But still I am unable to see the text in the blinking effect.Can you please tell me where did I go wrong? Can you please tell me any other ways of blinking !!!!! (3 Replies)
Discussion started by: nsharath
3 Replies

6. Shell Programming and Scripting

ksh - how to echo something in color and bold

Hi all, I was to echo Hi in Red and Bold ; and echo There is in Green and bold I got bold to working using tput bold but i am having hard time getting the color. Any help is appreciated, jak (4 Replies)
Discussion started by: jakSun8
4 Replies

7. Shell Programming and Scripting

"BOLD" printing a variable in PS1 command

I would like to "BOLD" print the hostname in the following statement: export PS1=$USER"@"$(hostname -s):'$PWD>' Is there a special character I can put before and after the variable to make it bold or blinking? Thanks. (4 Replies)
Discussion started by: pdtak
4 Replies

8. Shell Programming and Scripting

blink a text/message in a ksh script

can anyone tell me how to bink a text in a ksh script for e,g file 1 #!/bin/ksh "this is my file" ----------------------------------------------- i want "this is my file" text to blink.thanks (9 Replies)
Discussion started by: ali560045
9 Replies

9. UNIX for Dummies Questions & Answers

blink message..

hi all.. i need to know, how i can put a message on motd file...when the user loggon and the server send a welcome message but blink message... thank you... (1 Reply)
Discussion started by: chanfle
1 Replies

10. Shell Programming and Scripting

blink / flash echo text in a menu

I have a ksh script that is a login menu for my end users. I would like to have one line of the welcome message flash when there is a system notice about an impending outage. The welcome message is a series of echo statements which prints a text file "msg of the day" with the status msg. I tried... (1 Reply)
Discussion started by: MizzGail
1 Replies
Login or Register to Ask a Question