Solved

Special Character

Posted on 2000-03-22
5
170 Views
Last Modified: 2010-04-20
Hi how to edit the text so it can echo on console as Bold (highlight) or have a beep ?
0
Comment
Question by:ahTri
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:fremsley
ID: 2644045
Be a bit more specific, please.
0
 
LVL 14

Accepted Solution

by:
mcrider earned 50 total points
ID: 2644731
Look at your /etc/termcap file, and check out the man page on termcap...

To echo bold characters to the screen, do this... Any place you see ^ you should hold down the control key and hit the key that follows the ^:

   echo "^v^[[1mHello^v^[[0mWorld"

To send a beep, do this:

   echo "^v^g"



Cheers!®©
0
 

Author Comment

by:ahTri
ID: 2647248
Thanks, is there any fancy thing else ? like blinking for example !
0
 
LVL 2

Expert Comment

by:fremsley
ID: 2648336
Yes, you can set blinking and colours, see:

  http://www.dee.ufpb.br/~bob/tools/ansi.html

Remember: ^[ means ESC.
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2648653
fremsley,

Actually with ^[ you can hit ESC or do the actual CTRL-[

They both generate x1B...



ahTri,

All of the codes are defined in your /etc/termcap file.  See the MAN page on termcap, and then look at your termcap file.  Thanks for the points, glad I could help!  



Cheers!®©

0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now