Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-21-2010, 11:29 PM   #1
Registered: Jan 2008
Posts: 258

Rep: Reputation: 30
bold the word

I have a script to output the result ( eg. echo $x ) , then send result to my Lotus mail server , can advise if I want to bold the words in the mail , what can i do ? thx
Old 07-22-2010, 01:14 AM   #2
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 611

Rep: Reputation: 220Reputation: 220Reputation: 220
With plain vanilla email, there is no bold. It's just plain ASCII text like you see in vi or notepad.

However, almost all email readers seamlessly interpret HTML, so put HTML tags in the message, and you can bold, italic, set fonts, or even blink.
1 members found this post helpful.
Old 07-22-2010, 08:25 AM   #3
LQ 5k Club
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
If, as stated above, you want to implement bold text via HTML, use this:

echo "<b>$x</b>"
You should also make sure that the contents of $x do not contain HTML control characters that could mess up the document. This piece of Perl code will make any string display verbatim in an HTML document instead of tags trying to be interpreted:

#!/usr/bin/env perl
use warnings;
use strict;

my %substitutions = (
	'<' => '&lt;',
	'>' => '&gt;',
	'&' => '&amp;',

while (read STDIN, $_, 1) {
    if (exists $substitutions{$_}) {
		print $substitutions{$_};
	} else {
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i read two files word by word at a time using any loop by shell script? vaibhavs17 Programming 16 03-19-2010 04:48 AM
print second word in 1st line along with 5th word in all the lines after the first bangaram Programming 5 08-31-2009 04:42 AM
variable length string using GD (word wrap, carriage return, word/character count)? frieza Programming 1 02-14-2009 06:21 PM
Problems Copying & Pasting In Word When Word Closes - Ubuntu davidx Linux - Software 3 10-22-2008 09:21 PM
bold the word in report ust Linux - Newbie 1 01-22-2008 05:49 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration