Sponsored Content
Full Discussion: Bold Characters
Top Forums Shell Programming and Scripting Bold Characters Post 302362386 by cfajohnson on Thursday 15th of October 2009 09:49:02 PM
Old 10-15-2009
Quote:
Originally Posted by scottn
Hi.

You could try:

But there is no guarantee that it will work.

There are two different versions of tput; one uses the terminfo database, the other the termcap database.

As I wrote in Pro Bash Programming (publication date is next Monday, Oct. 19):

Unix purists will shake their heads over this chapter. Traditionally, screen manipulation is done through the termcap or terminfo database that supplies the information necessary to manipulate any of dozens or even hundreds of types of terminal. The shell interface to the database is an external command, tput.

On some systems, tput uses the termcap database; on others (mostly newer systems) it uses the terminfo database. The commands for the two databases are not the same, so a tput command written for one system may not work on another.

On one system, the command to place the cursor at the 20th column on the 10th row is:

tput cup 9 19

On another system, the command is:

tput cm 19 9

These commands will produce the correct output for whatever type of terminal is specified in the TERM variable. (Note: tput starts counting at 0.)

However, the plethora of terminal types has, for all intents and purposes, been reduced to a single, standard type. This standard, ISO 6429 (also known as ECMA-48, and formerly known as ANSI X3.64 or VT100), is ubiquitous, and terminals that do not support it are few and far between. As a result, it is now feasible to code for a single terminal type. One advantage of this homogeneity is that the necessary coding can be done entirely within the shell. There's no need for an external command.
This is the code to use:

Code:
printf "\e[1m"  ## bold on
printf "\e[0m"  ## bold (and other attributes) off

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bold the paragraph

Hi, I have a file with multiple paragraph. I want to look for some word and make that paragraph bold. How can I do that? Thanks, Karthik (3 Replies)
Discussion started by: caprikar
3 Replies

2. UNIX for Dummies Questions & Answers

Printing in Bold

Hi, How do I print some shell variable in BOLD/ Thanks for any suggestions, Preeti (10 Replies)
Discussion started by: preetikate
10 Replies

3. Programming

Bold text

hello, how do i display the text in the printf statement in bold. or is there anyway to display the text on the console in bold thx in advance svh (3 Replies)
Discussion started by: svh
3 Replies

4. Shell Programming and Scripting

color,bold

hi friend , I am generating a csv file i,e output file E104|0|06/04/1994|The values E005 and E001 are not equal. E106|0|01/09/1993|The values E001 and E002 are not equal. E106|0|01/09/1993|The values E003 and E002 are not equal. E108|0|02/30/1995|The values R001 and E001 are not equal.... (0 Replies)
Discussion started by: charandevu
0 Replies

5. Shell Programming and Scripting

Bold characters in c shell

Hi, Can someone tell me how to display characters in Bold in C shell?? (9 Replies)
Discussion started by: hemangi13
9 Replies

6. UNIX and Linux Applications

Bold characters in mail

I sh, I have bold characters in a file and I want to mail file to an ID. $cat file Incorrect or invalid external email IDs in TO and CC list for email_rules: If I pass this file to mailx $ cat file | mailx -s "hi" abc@xyz.com What I get in mail is  (8 Replies)
Discussion started by: hemangi13
8 Replies

7. Shell Programming and Scripting

Bold characters in a file using Shell script

Hi, When I am running below mentioned script then the characters become bold but after opening the same file in Windows, Instead of getting bold characters i am getting some garbage value for \033Kunal Dixit Output in Windows (after ftp the file): but in windows , i am getting My name is... (0 Replies)
Discussion started by: kunal_dixit
0 Replies

8. Shell Programming and Scripting

how to display in bold

Hi, i am using mailx option to send mail from unix In the body of the mail i want certain numbers to be displayed in bold Is there any way to do it If so, can anyone help me in this regard. (2 Replies)
Discussion started by: trichyselva
2 Replies

9. Shell Programming and Scripting

Making Some Characters in file BOLD

Hi All, I want to make some characters to be bold in a file. I have a file e.g aa.log which contains rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr gfgfgdaerqrqwrqerqwrwqwrqrqwrqr qqwerqwrqwrqwrqwrqwrqwrqwrq qwrqwrqwrqwrqwrqwrqwrqwrqwr File is too large to view Last line... (2 Replies)
Discussion started by: rajeshorpu
2 Replies

10. UNIX for Dummies Questions & Answers

Need help getting rid of bold characters

Hi! So i've got this shell script that asks questions and the user is required to input answers. The answers typed are bold. sh-*.*$ sh filename dir cat question tput bold read ans tput sgr0 ... and so on tput sgr0 exit So when the script ends i don't get the bold characters... (3 Replies)
Discussion started by: Kingzy
3 Replies
VWRIGHT(1)						      General Commands Manual							VWRIGHT(1)

NAME
vwright - normalize a RADIANCE view, shift it to the right SYNOPSIS
vwright [ view options ] distance vwright [ view options ] name DESCRIPTION
In the first form, vwright shifts a RADIANCE view the specified distance to the right, putting out a complete set of view parameters in a single line on the standard output. This utility is most often used to compute a right-eyed view from a left-eye view for stereo imaging. If no options are specified on the command line, vwright reads a view from its standard input. The distance given is in world coordinate units. A negative value indicates a shift to the left rather than the right. The second form substitutes a name prefix in place of the shift distance, and produces constant assignments on the standard output suitable for passing directly to rcalc(1). For a given prefix N, the constant names are as follows: Nt: view type ('v'==1,'l'==2,'a'==3,'h'==4,'c'==5,'s'==6) Npx: view point x value Npy: view point y value Npz: view point z value Ndx: view direction x value (normalized) Ndy: view direction y value (normalized) Ndz: view direction z value (normalized) Nd: view focal distance Nux: view up vector x value (normalized) Nuy: view up vector y value (normalized) Nuz: view up vector z value (normalized) Nh: view horizontal size Nv: view vertical size Ns: view shift Nl: view lift No: view fore clipping distance Na: view aft clipping distance Nhx: derived horizontal image vector x value (normalized) Nhy: derived horizontal image vector y value (normalized) Nhz: derived horizontal image vector z value (normalized) Nhn: derived horizontal image vector multiplier Nvx: derived vertical image vector x value (normalized) Nvy: derived vertical image vector y value (normalized) Nvz: derived vertical image vector z value (normalized) Nvn: derived vertical image vector multiplier EXAMPLES
To start rpict(1) on a view .06 meters left of the view in the file "right.vf": rpict `vwright -.06 < right.vf` scene.oct > right.hdr & To move the rad(1) view named "left" 2.5 inches to the right and render from there: rad -v "right `rad -n -s -V -v left examp.rif | vwright 2.5`" examp.rif & To pass a view to rcalc for conversion to some other view: rcalc -n -e `vwright orig < orig.vf` -f viewmod.cal -o view.fmt > new.vf AUTHOR
Greg Ward SEE ALSO
pdfblur(1), rad(1), rcalc(1), rpict(1), rvu(1) RADIANCE
8/29/96 VWRIGHT(1)
All times are GMT -4. The time now is 02:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy