I'm connecting to 15 servers in using ssh and storing disk space details of each server in a text file Finally , I'm emailing that text file at the particular id using mail -x . The report looks something like this.
For file systems which have space greater than 90% , I want to display those in different color or in bold ...I just want to highlight those so that person reading email should get attention quickly to that filesystem but since I am storing the output in .txt file this is not achievable.I tried storing the output in .html file but could not succeed. Is there any easy way to achieve this ?
e.g. only the last row in the above report should be in red as below.
/dev/md/dsk/d53 5.9G 5.4G 507M 92% /u01
No this is also not working ...if not in color can we have specific part of the output differentiated in some way ...may be in bold or in different font ..
I actually got output email but it was not HTML formatted .. the output came in the email like this..
From: some.user@other.machine
Subject: Test
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----_=_NextPart_000_01C5B90C.9F15F690"
------_=_NextPart_000_01C5B90C.9F15F690
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE html PUBliC "-//W3C//DTD html 4.0 Transitional//EN"> <html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</head>
<body>
<div>
<b>
Testing 1 2 3.
</b><br>
</div>
</body>
</html>
should be on the same line as Content-Type. Somehow it got cut into two lines during the multiple copy/pastes. Change the "From" address and use sendmail and try again.
Hi funksen, Thanks all these servers belong to our client so he may not allow us to install such tools. Even he does there is lot of approval process which takes few months of time.
We initially thought of sending mails only of file systems > 90% but what our management is really looking at is a daily complete well formatted report.