Sponsored Content
Top Forums Shell Programming and Scripting Color Underline and Bold letter in shell script Post 302495674 by mcagaurav on Thursday 10th of February 2011 11:28:35 PM
Old 02-11-2011
Color Underline and Bold letter in shell script

Hi All,
This is my first port.....

I am using AIX 5L, installed 10g database.
On daily basis we takes rman backup.
This backup status info strored in a log file.

I write a script to know the status of back means I will fire this script and this script will send a mail to me.
Code:
#!/bin/bash
ADMIN="xxxx@aaaaa.com"
. $HOME/.profile
SID=PROD
for SID in PROD
do
  cd /rman_bkp/logs
#
  cp /rman_bkp/logs/level0_backup_DB*.log /rman_bkp/logs/dbbkp.lst
  grep RMAN- /rman_bkp/logs/dbbkp.lst > /rman_bkp/logs/dbbkp_err.lst
  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
done

now the question is :

can I make this echo part of script in BOLD, UNDERLINE and give some color to this ?????

so that when this script run and send me a mail the echo part will look like heading.

Please suggest
Any help appriciate

Thanks in ADV

Last edited by Scott; 02-11-2011 at 02:35 AM.. Reason: Please use code tags
 

9 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

9. 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
IBDMCHK(1)						       IB DATA MODEL PACKAGE							IBDMCHK(1)

NAME
IBDM - Network Checker and Attributes Analyzer SYNOPSYS
ibdmchk has two operation modes: design and verification. DESIGN: ibdmchk [-v][-h][-u][-r <roots file>] -t <topology file> -n <SM Node> -p <SM Port> [-e] [-l <lmc>] VERIFICATION: ibdmchk [-v][-h][-r <roots file>] [-s <subnet file>] [-f <fdb file>] [-m <mcfdbs file> [-l <lmc>] [-u] [-M] [-a] [-c <path sl file>] [-d <sl2vl tables file>] DESIGN MODE DESCRIPTION
The Design mode is intended to be used before the cluster is built. It provides basic checks of the specified network as described by a topology file. After simulating the SM LID assignment and routing algorithms it provides reports of the (H)CA to (H)CA paths depth his- togram and credit deadlock potential in the resulting routing scheme. ARGUMENTS
: -t|--topo <topo file> The topology file specifying the network. See man ibdm-topology-file -n|--node <SM Node> The name of the Subnet Manager node (syntax: <Topo-File-System>/U1) -p|--port <SM Port> The port number by which the SM nodes is attached to the fabric. OPTIONS
-v|--verbose Verbsoe mode -h|--help Provides this help message -l|--lmc <lmc> LMC value > 0 means assigning 2^lmc lids to each port. -e|--enh Use enhanced routing algorithm when LMC > 0 and report the resulting paths correlation (using same system/node) histogram -r|--roots <roots file> A file with all the roots node names (one on each line). VERIFICATION MODE DESCRIPTION
After the cluster is built and OpenSM is run (using flag -D 0x43) it reports the subnet and FDB tables into the files osm-subnet.lst, osm.fdbs and osm.fdbs in /var/log/ (or subnet.lst, osm.fdbs and osm.mcfdbs into /var/cache/ibutils in older OpenSM versions). ibdiagnet is also producing the same files in its output directory. Based on these files the utility checks all CA to CA connectivity. Further analysis for credit deadlock potential is performed and reported. In case of an LMC > 0 it reports histograms for how many systems and nodes are common between the different paths for the same port pairs. ARGUMENTS
-l|--lmc <lmc> The LMC value used while running OpenSM. Mandatory if not the default 0. OPTIONS
-v|--verbose Verbsoe mode -h|--help Provides this help message -s|--subnet <file> OpenSM subnet.lst file (default is /var/log/osm-subnet.lst or /var/cache/ibutils/subnet.lst) -f|--fdb <file> OpenSM dump of Ucast LFDB. Use -D 0x41 to generate it (default is /var/log/osm.fdbs or /var/cache/ibutils/osm.fdbs). -m|--mcfdb <file> OpenSM dump of Multicast LFDB. Use -D 0x41 to generate it (default is /var/log/osm.mcfdbs or /var/cache/ibutils/osm.mcfdbs). -c|--psl <file> Source Guid to DLID -> Path SL mapping. Each line holds: src_node_guid dlid sl. Used by the credit loop check to accuartly model SL/VL based routing. -d|--slvl <file> SL2VL mapping of all switces. Each line holds: swguid iport oport 0x(sl0)(sl1) 0x(sl2)(sl3)... Used by the credit loop check to accuartly model SL/VL based routing. -r|--roots <roots file> A file holding all root nodes guids (one per line). -u|--updn Use Up/Down based credit loop check algorithm instead of the generic one. -M|--MFT Include multicast routing in credit loops analysis. -a|--all Verify not only CA-CA paths but also SW-SW, CA-SW and SW-CA. Both check for FDB path connectivity and also for credit loops. AUTHOR
Eitan Zahavi, Mellanox Technologies LTD, eitan@mellanox.co.il IBDM 1.0 2009-03-17 IBDMCHK(1)
All times are GMT -4. The time now is 07:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy