Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

Special Character

Hi how to edit the text so it can echo on console as Bold (highlight) or have a beep ?
0
ahTri
Asked:
ahTri
  • 2
  • 2
1 Solution
 
fremsleyCommented:
Be a bit more specific, please.
0
 
mcriderCommented:
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
 
ahTriAuthor Commented:
Thanks, is there any fancy thing else ? like blinking for example !
0
 
fremsleyCommented:
Yes, you can set blinking and colours, see:

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

Remember: ^[ means ESC.
0
 
mcriderCommented:
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now