Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Disk space script output in color Post 302585588 by ajaypatil_am on Wednesday 28th of December 2011 11:08:49 PM
Old 12-29-2011
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 ..

Quote:
Originally Posted by itkamaraj
hmm.. without sendmail.. i am not sure.. but found this below code in google. just give a try.

html file :file.html

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

shell code
Code:
 
(cat file.html | mailx user@some.machine)


Last edited by ajaypatil_am; 12-29-2011 at 04:18 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Disk space script

Hi all, Can any one help me in making a disk space script in solaris 8/9 for instance i only want to get those partitions whose diskspace has exceed 70%. Any volunteer? Cheers! BR/asad (8 Replies)
Discussion started by: asadlone
8 Replies

2. Shell Programming and Scripting

Script for Disk space

:( Hi All, i have 4 linux server for which i want set up script to monitor the disk space ... here my problem is i want the output like graph... also it should reflect in monitor ...as non stop process.. can any one suggest me any way where i can implement the script? ... (3 Replies)
Discussion started by: Shahul
3 Replies

3. Shell Programming and Scripting

putting color on output file script

do you have any simple script on how to change the color and font of a string in a script example echo "====================================" echo " sample color script" echo "====================================" echo " hello " echo " bye" on hello,... (3 Replies)
Discussion started by: lhareigh890
3 Replies

4. Shell Programming and Scripting

Append color in shell script for output

Hi Experts, I want to get my shell script output in a color for a particular word. PFB my output. TT.QM.JTV1S1 TLORSBT2.JMR701T1.C1 REPOS TT.QM.JTV1R1 TLORSBF2.JMR701T1.C1 NORMAL whenever REPOS word comes then entire line should come in red color. Can you please help me... (4 Replies)
Discussion started by: darling
4 Replies

5. Shell Programming and Scripting

Disk Space Output

I am very new to unix and Linux, So I have a question about LINUX and AIX. What LINUX and AIX commands can be used to get the following output: 071912 GB blocks Free %Iused Mounted on 071912 5.00 4.64 8% / 071912 15.00 9.44 38% /usr 071912 6.00 2.56 58% /var 071912 15.00 12.88 15% /tmp... (1 Reply)
Discussion started by: najeemsarwat
1 Replies

6. Shell Programming and Scripting

Color encoding on the disk space script

Hi All, Hope all are doing good!! Am glad that i have utilized some ideas and written a code to make the disk space result comes better and it was successfully running in the production. The next update from my manager was to make this code to come in a table format with color added. 1)... (28 Replies)
Discussion started by: Kalaihari
28 Replies

7. Shell Programming and Scripting

Disk Space Script to direct output

Hi, I am working on Sun Solaris 5.10 and want to direct the output from a disk space check script to an output file; #!/bin/bash CURRENT=$(df -k /log/logs | grep /log/logs | awk '{ print $5}' | sed 's/%//g') THRESHOLD=30 if ; then echo "Remaining free space is low" > output.txt else... (10 Replies)
Discussion started by: SSKAAB
10 Replies

8. Shell Programming and Scripting

I need help!! disk free space script

i want to write a shell script,when disk uses is 90% then automatically send a email to distribution list (group member)...... (1 Reply)
Discussion started by: sonu pandey
1 Replies

9. UNIX for Beginners Questions & Answers

Cutting disk space output

Running this code df -h | head -2 | awk '{print $8}' Gives me the following output: %iused 6% What I'm trying to do is get the 6% but I'm having trouble doing this using cut -c, I think that this could be because the text is on different lines; is there a way of doing this? (8 Replies)
Discussion started by: $shell_Learner
8 Replies

10. UNIX for Beginners Questions & Answers

Disk space script

i have 3 servers and i am checking for the disk space of a specific mount-point, should not be more than 85 % considering example as below server1 mountpoint_1 has 70% diskutilization server2 mountpoint_1 has 80% diskutilization server3 mountpoint_1 has 7% diskutilization now when it... (6 Replies)
Discussion started by: abhaydas
6 Replies
WARNQUOTA.CONF(5)						File Formats Manual						 WARNQUOTA.CONF(5)

NAME
warnquota.conf - configuration for warnquota SYNOPSIS
/etc/warnquota.conf DESCRIPTION
The warnquota.conf file stores a configuration for warnquota(8) tool which is used to notify a user or a group who exceeds its disk quota limits. The syntax is an option name followed by an equal sign and the option value. White space characters surrounding the option names and val- ues are allowed. Empty lines or lines starting with a hash sign or a semicolon are ignored. An option value can but does not have to be quoted. The value can span across multiple lines provided each previous line ends with a back- slash. Some option values can contain formatting sequences which will be expanded to their respective values. Following sequences are recognized: %d domain name %h host name %i, %s user or group name %% literal % character | new-line character OPTIONS
CC_BEFORE Send to copy-carbon address only when a user has less than specified grace time left. Value is a number followed by a time unit. Known units are seconds, minutes, hours, and days. Example: 5 days CC_TO An e-mail address to put into copy-carbon (CC:) recipient header. Default value is root. CHARSET Defines character set for sent e-mails. Default value will be current locale character set used when executing warn- quota command, if locale is not either C or POSIX. Otherwise no character set will be specified in the e-mails. FROM Defines From: e-email address. Default value is support@localhost. GROUP_MESSAGE A text sent as an e-mail body if a group exceeds its limits. This option recognizes formatting sequences. GROUP_SIGNATURE A signature text appended to notification for a group. Default value is a general explanation utilizing SUPPORT and PHONE values. This option recognizes formatting sequences. LDAP_BASEDN Base distinguished name for LDAP queries. LDAP_BINDDN Bind distinguished name for LDAP queries. LDAP_BINDPW Bind password for LDAP queries. LDAP_DEFAULT_MAIL_DOMAIN Default e-mail address domain of searched user if given LDAP attribute does not specify any. LDAP_HOST LDAP server name to connect to if LDAP_URI is not defined. LDAP_MAIL A boolean controlling if LDAP has to be used to look up user's e-mail address. Possible values are true and false. Default value is false. LDAP_MAIL_ATTRIBUTE The LDAP attribute which holds user's e-mail address. LDAP_PORT LDAP server port number to connect to if LDAP_URI is not defined. LDAP_SEARCH_ATTRIBUTE The LDAP attribute which holds user's ID to look up. LDAP_URI The URL of LDAP server to use to search user's e-mail addresses. This option takes preference over LDAP_HOST and LDAP_PORT. Example: ldaps://example.com:389/ MESSAGE A beginning of text sent as an e-mail body if a user exceeds his limits. This option recognizes formatting sequences. MAIL_CMD The command to execute to send an e-mail. The e-mail text including all headers is passed to the standard input of the command. Default value is /usr/lib/sendmail -t. MAILDEV The device with disk quotas to exclude from sending notifications if there are exceeded limits. This option should identify the device where mail boxes are stored to prevent from bouncing the warnquota notification by local MDA due to no space for storing new e-mails. Special value any denotes all devices. PHONE The telephone contact to the user support. Default value is (xxx) xxx-xxxx or (yyy) yyy-yyyy. SIGNATURE The end of e-mail body if a user exceeds its limits. Default value is a general explanation utilizing SUPPORT and PHONE values. This option recognizes formatting sequences. SUBJECT The text to put into Subject: header. Default value is Disk Quota usage on system. SUPPORT The contact to the user support. Default value is support@localhost. EXAMPLE
# comment FROM = root@example.com SUPPORT = support@example.com PHONE = 1234 FILES
/etc/warnquota.conf configuration for warnquota(8) SEE ALSO
warnquota(8). WARNQUOTA.CONF(5)
All times are GMT -4. The time now is 04:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy