Sponsored Content
Top Forums Shell Programming and Scripting Send mail with font color change Post 303037143 by sdosanjh on Wednesday 24th of July 2019 05:28:53 PM
Old 07-24-2019
Send mail with font color change

Hi All,
I have a file that contains following entries.
I want to highlight the line that has word as "FAILURE" while sending the email.

File
Code:
------------------------------------------------------------

Job Name:       ABC
Start Time:     07/20/2019 07:32:39
End Time:       07/20/2019 07:32:42
Status:         SUCCESS 07/20/2019 07:32:42

------------------------------------------------------------

Job Name:       DEF
Start Time:     07/20/2019 07:32:19
End Time:       07/20/2019 07:32:21
Status:         FAILURE 07/20/2019 07:30:26
Status:         SUCCESS 07/20/2019 07:32:21

------------------------------------------------------------

Job Name:       GHI
Start Time:     07/20/2019 07:30:06
End Time:       07/20/2019 07:30:08
Status:         SUCCESS 07/20/2019 07:30:08

------------------------------------------------------------

I am using following simple method to send mail, but not familiar how to change the font of particular text where error is seen.
Pls help

Code:
{
echo "From: "
echo "To:  abc@xyz.com
echo "Subject: Status Report - for jobs -- $DATE"

cat /tmp/report.$DATE
} | /usr/sbin/sendmail -t

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Font Color Change Using .profile

Does anyone know how can I change font color, background color etc for a particular user using .profile? Any help is appreciated. (0 Replies)
Discussion started by: fifo_vs_lifo23
0 Replies

2. HP-UX

How to change font and colour in mail sent from Unix

Dear All, We have following code to send mails from unix to users. We want to see few sentences of mail in bold font or to hightlight few lines in different colours. Could you please let me know how can we do it in function construct_body. ... (3 Replies)
Discussion started by: yogichavan
3 Replies

3. UNIX for Dummies Questions & Answers

How to change the font or color of text

Hi Gurus, I have a small requirement where i want to change the color & font of some text in a file. i have a file error.txt which will be created in the script using egrep. After that iam adding these lines at head & tail to that file using the following code awk 'BEGIN{print"Please... (4 Replies)
Discussion started by: pssandeep
4 Replies

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

5. Shell Programming and Scripting

Change color or font when executing a script

I'm writing a simple menu script and I would like to output the whole script using background color: black AND foreground color:white. Meaning if the ssh terminal of a user is set to green for example, it will change to my desired color when menu script is executed. Once the script is exited, it... (1 Reply)
Discussion started by: lhareigh890
1 Replies

6. Shell Programming and Scripting

font color in script

i am using ubuntu 11.04 and i just finished writing a shell script but i was wanting to know if their is a way to change the font color of just one sentence? (2 Replies)
Discussion started by: hotshot247
2 Replies

7. UNIX for Dummies Questions & Answers

How to change the background color in the init 3 mode(not line color)

Hello, I am using RHEL 6.1 on VMware I am searching for a way to change background color (not line by line color wich one can using tput command) basically changing the color of the whole screen to white instead of the default black and changing font color to black and alos would like to... (2 Replies)
Discussion started by: Dexobox
2 Replies

8. Shell Programming and Scripting

Identify Color and send email with same color

Hello mates, I have a requirement where in which I have to mail an output from multiple programs in the same colour as the output from shell script. I have seen a post to mail html in our forum,but my case is I have to first identify which colour the output is in an then mail it to in the ... (10 Replies)
Discussion started by: Kingcobra
10 Replies

9. UNIX for Beginners Questions & Answers

Send mail with font change

Hi All, I have a file that contains following entries. I want to highlight the line that has word as "FAILURE" while sending the email. File ------------------------------------------------------------ Job Name: ABC Start Time: 07/20/2019 07:32:39 End Time: 07/20/2019... (4 Replies)
Discussion started by: sdosanjh
4 Replies
WMBIFF(1)						      General Commands Manual							 WMBIFF(1)

NAME
WMBiff - A dockable Mailbox Monitor SYNOPSIS
wmbiff [-display <display name>] [-geometry +XPOS+YPOS] [-c <filename>] [-h] [-v] [-debug] [-fg <foreground-color>] [-font <X11 font>|default] [-hi <highlight-color>] [+w] DESCRIPTION
WMbiff displays the status of up to five mailboxes. It shows the number of new mail messages, if any, or the total number of messages. It also has mail retrieval capabilies, and can be configured to do this automatically. At the moment, UNIX-style, maildir, POP3, APOP and IMAP4 mailboxes are supported. WMbiff also supports Licq history files and gnomeicu, displaying the number of new messages in your running session, as if they were mail. The mailboxes are displayed in 5 different lines, each one with its own description of up to five chars. If no mail is present in a given mailbox, WMbiff will display the total number of mails in cyan. If there's new mail in the box, the number of new messages will be dis- played in yellow. When new mail arrives, this number will optionally flash for a small period of time, and also optionally, a command can be executed on mail arrival (for example, opening your mail reader or playing a sound file). Pressing mouse button 1 will execute a command, defined in the user's config file. Mouse button 3 will execute a command to fetch mail, if defined. To restart wmbiff, press mouse button 1 while holding control and shift keys, or send it SIGUSR1. OPTIONS
-h Show summary of options. -v Show version of program. -display <display name> Use an alternate X Display. -geometry <geometry> Initial window position. -c <filename> Use specified configuration file instead of ~/.wmbiffrc. -debug Print verbose log of progress. -fg <color> Use specified X11 color. Implies -font default, unless overridden. -font <font> Use specified X11 font instead of the LED pixmap. This may be more readable or suitable for some non-US characters. The special font "default" tells wmbiff to use a compile time default. -hi <color> Use specified X11 color for new mail counters. Implies -font default, unless overridden. -skip-certificate-check When using TLS (IMAPS), keep going, even if the server's certificate is invalid. Invalid certificates have expired, have a differ- ent hostname than you connected to, are corrupt, or have been revoked. Do not use this option unless wmbiff fails and suggests it to you, and even then, be careful and consider alerting your mail system administrator first. The need to use this option is a sign of server misconfiguration. +w Do not use the "withdrawn" state: the wmbiff window will not be captured as an icon and placed in the dock, but will instead have its own window. This option starts with a '+' for consistency with other software programs: many use '-w' to mean the opposite. BUGS
Send bug reports or suggestions to the WMBiff Development Mailing List <wmbiff-devel@lists.sourceforge.net>. Consider attaching a tran- script of your session, generated using: wmbiff -debug | tee wmbiff-log Be sure to remove any instances of your password. FILES
~/.wmbiffrc peruser wmbiff configuration file. AUTHOR
This manual page was written by Jordi Mallach <jordi@sindominio.net>, originally for the Debian system (but may be used by others). WMBiff was first maintained by Gennady Belyakov. Since January 2001 it is maintained group of people that have added lots of new features to the original program. Please see the README document for a list of all the people involved. SEE ALSO
wmbiffrc(5) /usr/share/doc/wmbiff/examples/sample.wmbiffrc (or equivalent for your system) wmbiff October 4, 2001 WMBIFF(1)
All times are GMT -4. The time now is 03:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy