06-24-2008
I have not tested the syntax, but should be something like this:
#!/bin/ksh
meta=`metastat > /var/tmp/meta.out`
output=`cat /var/tmp/meta.out |grep State | awk '{print $2}'`
if [ ${output} != Okay ];then
mailx -s "Attention: Disk Error" "xxx@gmail.com" << ${meta}
Last edited by incredible; 06-24-2008 at 07:26 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I need to prepare a script which will check my database with specific to particluar table. If the row count exceeds a certain limit, i need to send a mail to a set of Recipients.
Being new to unix, please guide me to complete this task.
Advance thanks,
Sekar. (4 Replies)
Discussion started by: Sekar1
4 Replies
2. Shell Programming and Scripting
Hi,
I am trying to call sql script from ksh job with parameters.The parameters passed from ksh job will be used in SELECT query in sql file to SPOOL the data in extract file.My questions are:
1) How to call a sql script from ksh job with parameters?
2) How to use the parameter in sql file to... (1 Reply)
Discussion started by: anil029
1 Replies
3. UNIX for Advanced & Expert Users
i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail.
actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies
4. Shell Programming and Scripting
Hi,
I have written one script for sending mails with attachment.
currently its working for only one recipient.
I want to send mails to n number of users by taking user input i.e number of users.
Output of current script:
Enter how many files : 1
Enter First Name : kiran
E-Mail... (2 Replies)
Discussion started by: kiran_j
2 Replies
5. Shell Programming and Scripting
Hi Experts..
i have created a table with the fields,
empid name mailid
1 raja raja@xy.com
and entered the values of all persons who are in that file...
i have a .csv file
date shift1 shift2
6/6/2011 ram raja
Now i want a script that could fetch the data in (input file .csv file) and... (3 Replies)
Discussion started by: cratercrabs
3 Replies
6. Shell Programming and Scripting
Hi,
I am getting the following error while running send mail command from a shell script?
Insufficient disk space; try again later
How to handle this error? (1 Reply)
Discussion started by: AhmedLakadkutta
1 Replies
7. Linux
Hi guys,
i am using the below command to send mail
mail -s "HI" abcd@how.com < temp_mail.txt
I am getting the below error
send-mail: fatal: bad string length 0 < 1: myorigin =
My os version is as
Linux
Help me with ur suggestion guys thank u. (3 Replies)
Discussion started by: mohanalakshmi
3 Replies
8. Shell Programming and Scripting
ENVIROMENT
Linux: RHEL 6.4
Log Path: /usr/iplanet/servers/https-company/logs
Log Format: user.log.03-15-2015
I have log4j log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I need a script that will run daily that... (1 Reply)
Discussion started by: admin_job_admin
1 Replies
9. Shell Programming and Scripting
Hi Guys,
I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies
10. UNIX for Advanced & Expert Users
I am having trouble getting mail to work on a red hat server. At first I was getting this message.
Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused
Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies
LEARN ABOUT MOJAVE
moosex::classattribute::trait::class
MooseX::ClassAttribute::Trait::Class(3) User Contributed Perl Documentation MooseX::ClassAttribute::Trait::Class(3)
NAME
MooseX::ClassAttribute::Trait::Class - A trait for classes with class attributes
VERSION
version 0.27
SYNOPSIS
for my $attr ( HasClassAttributes->meta()->get_all_class_attributes() )
{
print $attr->name();
}
DESCRIPTION
This role adds awareness of class attributes to a metaclass object. It provides a set of introspection methods that largely parallel the
existing attribute methods, except they operate on class attributes.
METHODS
Every method provided by this role has an analogous method in "Class::MOP::Class" or "Moose::Meta::Class" for regular attributes.
$meta->has_class_attribute($name)
$meta->get_class_attribute($name)
$meta->get_class_attribute_list()
These methods operate on the current metaclass only.
$meta->add_class_attribute(...)
This accepts the same options as the Moose::Meta::Attribute "add_attribute()" method. However, if an attribute is specified as "required"
an error will be thrown.
$meta->remove_class_attribute($name)
If the named class attribute exists, it is removed from the class, along with its accessor methods.
$meta->get_all_class_attributes()
This method returns a list of attribute objects for the class and all its parent classes.
$meta->find_class_attribute_by_name($name)
This method looks at the class and all its parent classes for the named class attribute.
$meta->get_class_attribute_value($name)
$meta->set_class_attribute_value($name, $value)
$meta->set_class_attribute_value($name)
$meta->clear_class_attribute_value($name)
These methods operate on the storage for class attribute values, which is attached to the metaclass object.
There's really no good reason for you to call these methods unless you're doing some deep hacking. They are named as public methods solely
because they are used by other meta roles and classes in this distribution.
BUGS
See MooseX::ClassAttribute for details.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2013 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
perl v5.18.2 2013-03-28 MooseX::ClassAttribute::Trait::Class(3)