Color Underline and Bold letter in shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Color Underline and Bold letter in shell script
# 8  
Old 02-15-2011
Try replacing...
Code:
  if [ `cat /rman_bkp/logs/dbbkp_err.lst|wc -l` -gt 0 ]
  then
    echo "DB bkp gone in ERROR :\n" > rman_bkp_st.lst
    cat /rman_bkp/logs/dbbkp_err.lst >> rman_bkp_st.lst
  else
    echo "All DB bkp Completed Successfully" >> rman_bkp_st.lst
  fi
  cat rman_bkp_st.lst|mailx -s "${SID} RMAN BACKUP STATUS" $ADMIN

...with...
Code:
  if [ `wc -l < /rman_bkp/logs/dbbkp_err.lst` -gt 0 ]
  then
    echo "<B>DB bkp gone in ERROR :</B><BR><PRE>" 
    cat /rman_bkp/logs/dbbkp_err.lst
    echo "</PRE>"
  else
    echo "<B>All DB bkp Completed Successfully</B><BR>" 
  fi > rman_bkp_st.html
  (
    echo "Subject: ${SID} RMAN BACKUP STATUS"
    echo "MIME-Version: 1.0"
    echo "Content-Type: text/html"
    echo "Content-Disposition: inline"
    cat rman_bkp_st.html
  ) | /usr/sbin/sendmail $ADMIN

# 9  
Old 02-18-2011
Hi Ygor,

Thanks for the prompted help.... it works Smilie
and giving the expected output in my mailbox through script.

Just one more thing, if I can fill some color + underline the echo part of the script ?????


Please suggest !

Thanks again
# 10  
Old 02-18-2011
You can use any html tags you like.
# 11  
Old 02-19-2011
Hi Ygor,

All set proper.. Thanks for all your help budy..... Smilie

ygor...need to know one more thing..

can I BLINK a part of echo statement.....
I tried this one....

echo "<BLINK><font size="2" face="Verdana" color=green>All DB bkp Completed Successfully.</font></BLINK><BR><BR>"

but it doen'nt work...

Is there any way to do so ????

Thanks again
# 12  
Old 02-22-2011
Blink and smileys in shell script

Hi all,

I wrote a script which run in my AIX box, store a copy of output in to the same box and then send this copy to my mail address into windows outlook.... it is working as exected and sending me mail.....


I just want to add some blinking text....
eg:

if [condition}
ehco " This is good"
else
echo "Attention: this is not good "
fi

Please suggest is there any way to blink this else part of the script.
so that when it send me a mail (into outlook) it shows in blinking.....


Please suggest !
# 13  
Old 02-22-2011
You might have trouble with Blink

For images use <IMG> e.g... <img src="http://i1236.photobucket.com/albums/ff442/starfruit2/0099.gif" border="0">
# 14  
Old 02-22-2011
Thanks for the update !

so I am using code like this... plz varify

if [ `wc -l < /d05_proddbx/dba/My_scr/dbbkp_err.lst` -gt 0 ]
then
echo "<font size="2" face="Verdana" color=red>DB BKP gone in ERROR :<BR></font><PRE>"
cat /d05_proddbx/dba/My_scr/dbbkp_err.lst
echo "</PRE>"
else
echo "<font size="2" face="Verdana" color=green>All DB bkp Completed Successfully.</font><BR><BR>"
<img src="http://i1236.photobucket.com/albums/...ruit2/0099.gif" border="0">
fi >> rman_bkp_st.html
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Bold letter in email body

Hi All, The below is the email text and i want few words in BOLD. I am writing the below message in to a .txt file and calling it in a function which generated email. when i run at cmd prompt it is working fine , but wehn i run a script .sh it is not working. Below is the text printing in to... (2 Replies)
Discussion started by: kiranparsha
2 Replies

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

3. Shell Programming and Scripting

Sending email message in colour and bold letter

The code echo -e "\033[34m Test \033[0m Mail" when i execute this command line i get proper output but when i mail the output of this command through sendmail it doesn't appear. Basically I want to send email message in diffrent colours, bold letter using shell script. (2 Replies)
Discussion started by: baps
2 Replies

4. Shell Programming and Scripting

Bold and Underline - not displyed in more/less/vi

I have a script main.shl which has few lines like this #bold tput smso echo "\t\tsome statement\t\t" tput rmso I am executing the main.shl from the shell and redirected its output to a separate file like this $main.shl >main.log 2>&1 & once after running this script, if I "cat" the... (0 Replies)
Discussion started by: ramkrix
0 Replies

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

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. Shell Programming and Scripting

ksh - how to echo something in color and bold

Hi all, I was to echo Hi in Red and Bold ; and echo There is in Green and bold I got bold to working using tput bold but i am having hard time getting the color. Any help is appreciated, jak (4 Replies)
Discussion started by: jakSun8
4 Replies

8. Shell Programming and Scripting

Specifying font type and color in a shell script

Hi, I am new to shell script. Can you please tell me, whether can we specify font type and color in a shell script? If so, how to do this? Thanks in advance. (4 Replies)
Discussion started by: Vani_Govind
4 Replies

9. UNIX for Dummies Questions & Answers

How to underline/bold and how to align output

Hi, I work with AIX 5 and have two basic questions: 1) How do I underline/bold a word in a text output? Any way to do it with echo command? basic example: echo "FOLDER " >> folder.txt ( I wish the word FOLDER to be underlined and bold). 2) Suppose I have the following pipe delimited... (1 Reply)
Discussion started by: clara
1 Replies
Login or Register to Ask a Question