Printing in Bold


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Printing in Bold
# 1  
Old 02-23-2004
Printing in Bold

Hi,
How do I print some shell variable in BOLD/
Thanks for any suggestions,
Preeti
# 2  
Old 02-23-2004
See man tput
# 3  
Old 02-23-2004
checked man tput but still unclear!
# 4  
Old 02-23-2004
Here's one way...
Code:
bold=`tput bold`
norm=`tput sgr0`
echo example $bold$LOGNAME$norm

See also man terminfo
# 5  
Old 02-24-2004
Thank You!
TERMINFO is not recognized on IBM AIX I Guess!
# 6  
Old 02-24-2004
Printing in Bold through email via a shell script

$bold$var$norm works as expected on the unix prompt but when called in a shell script which sends output to a mail it prints 1m$var1m.. possibly because it it for terminal only. Is there a way I can have it printed in bold through a shell script which sends output in a mail.
# 7  
Old 02-24-2004
It depends on your mail client. I would guess that you are not using a terminal-based client (like /usr/bin/mail) to read the mail message. Some clients (Outlook,InterOffice) allow messages written in html, so try something like....
Code:
#!/usr/bin/ksh

export MAILTO="recipient@mail.com"
export SUBJECT="test message"
(
 echo "Subject: $SUBJECT"
 echo "MIME-Version: 1.0"
 echo "Content-Type: text/html"
 echo "Content-Disposition: inline"
 echo "<HTML><BODY>"
 echo "Test to see if <B>bold</B> works."
 echo "</BODY></HTML>"
) | /usr/sbin/sendmail $MAILTO

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sco Unix printing : jobs hangs in queue - printing via lp versus hpnpf

Hi, We have a Unix 3.2v5.0.5. I installed a printer via scoadmin, HP network printer manager with network peripheral name (hostname and ipadres are in /etc/hosts). This is the configuration file : Code: root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice:... (0 Replies)
Discussion started by: haezeban
0 Replies

2. Windows & DOS: Issues & Discussions

Linux to Windows Printing: PDF starts printing from middle of page.

We are using Red Hat. We have a issue like this: We want to print from Linux, to a printer attached to a Windows machine. What we want to print is a PDF. It prints, but the printing starts from the middle of the page. In the report, there is no space at the top but still printing starts from the... (5 Replies)
Discussion started by: rohan69
5 Replies

3. Shell Programming and Scripting

how can i bold a text

Dear i want to bold a text using shell script. please give sample.. Thanks rex (1 Reply)
Discussion started by: jrex1983
1 Replies

4. UNIX for Dummies Questions & Answers

What does a bold filename in ls mean?

I am ssh'd into my box using a terminal emulation of vt100. When I do a directory listing (ls) some of the file names are bold. I know that directories are also in bold, but these are not directories. What does a bolded filename mean? This seems like such a basic question, but I've spent 20... (3 Replies)
Discussion started by: nunemaj
3 Replies

5. 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

6. 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

7. UNIX for Dummies Questions & Answers

How can i make this bold

Folks; I'm writing this as a part of a script: echo "col1 hdg|col2hdg|col3hdg|" How can i make these fields shows in Bold text? (10 Replies)
Discussion started by: moe2266
10 Replies

8. 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

9. 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

10. UNIX for Dummies Questions & Answers

Bold Text?

Hello, On the linux box I use at work, the directories are bold type to distinguish them. Is there a way to make certain words in a text file bold? Thanks! (4 Replies)
Discussion started by: Atama
4 Replies
Login or Register to Ask a Question