Sponsored Content
Top Forums Shell Programming and Scripting Identify Color and send email with same color Post 302894034 by Kingcobra on Sunday 23rd of March 2014 08:12:31 AM
Old 03-23-2014
Thanks wisecracker for your reply,the actual requirement in our project is that we have a java program that prints text to the terminal when manually run and red when printed in all instances is an error,our requirement is that we need to send an email whenever red is outputted.
Now this check is being done manually we are planning to convert to cron tab and divert this output to a file and mail in cases only when file has anything in red color.But the problem here is when I redirect I am lossing the colors

---------- Post updated at 08:12 PM ---------- Previous update was at 08:10 PM ----------

In short the question is how do the retain color when text is redirected to a file.

ls -l --color|less -R would retain color

but how to I retain color when

someunixcommandwhich prints colored text>filename
 

2 More Discussions You Might Find Interesting

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

2. Shell Programming and Scripting

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 ------------------------------------------------------------ Job Name: ABC Start Time: 07/20/2019 07:32:39 End Time: 07/20/2019... (4 Replies)
Discussion started by: sdosanjh
4 Replies
All times are GMT -4. The time now is 11:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy