bold the word in report


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting bold the word in report
# 1  
Old 01-22-2008
bold the word in report

I hv script that will output a txt file report , the report content is as below, I would like the word "No error" is bolded so that this message is highlighted , can advise what can i do ? thx

Date : 2002-01-22
Error : No error
# 2  
Old 01-22-2008
Code:
tput bold 
echo "This"
tput sgr0 #Reset text attributes to normal without clear.
echo "This"

//Jadu
# 3  
Old 01-22-2008
using escape sequences:

Code:
$ echo -e "\033[1mThis is a BOLD line\033[0m"

//Jadu
# 4  
Old 01-22-2008
Bug try this ..

Quote:
Originally Posted by ust
I hv script that will output a txt file report , the report content is as below, I would like the word "No error" is bolded so that this message is highlighted , can advise what can i do ? thx

Date : 2002-01-22
Error : No error

Once you have created the txt file report , you can BOLD the "No error " using,

sed s/No error/$(tput bold)No error$(tput sgr0)/ report.txt > temp
mv temp report.txt
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with searching a word,find the identifier under which it is there and giving a report

Hi, i have a directory structure which contains few files each. each file in turn has some functions. i'm searching for a word, say 'pen' in all the files present in all the directories. :wall: consider a file file1.c in Dir1. out of the 3 funcs present in this file, func1(pennum) and... (3 Replies)
Discussion started by: i.srini89
3 Replies

2. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

3. Shell Programming and Scripting

Bold 1 word in a shell script

I want to bold one word in shell script. I want the value for num bold when it is inputted. My code does not bold the value. It's like its not even there. echo -n "Please read a number" read num ; echo "${bold} $num ${offbold}" Thank you, Ccccc (6 Replies)
Discussion started by: Ccccc
6 Replies

4. Shell Programming and Scripting

Bold Characters

Hi All, How to make the characters bold in k shell. like for example "File is too large to view" to "File is too large to view" is it like echo "File is too large to view" Please advice and samples (18 Replies)
Discussion started by: rajeshorpu
18 Replies

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

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

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

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