Sponsored Content
Top Forums Shell Programming and Scripting Need little script to send out email Post 302999139 by RudiC on Wednesday 14th of June 2017 02:35:47 AM
Old 06-14-2017
Almost certainly, yes. Look into the links at the lower left of this page, under "More UNIX and Linux Forum Topics You Might Find Helpful", or search these fora for "almost full".
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script that will send and email attachment

I'm looking for a sample of some code that will take the output from a file and generate an email that will include that text as an attachment. the script is in the borne shell. any help? (2 Replies)
Discussion started by: davels
2 Replies

2. Shell Programming and Scripting

script to send a file in email

a file is created on a daily basis in the name xyz_pqr_20071207.dat.i want to send the file as an attachment if the file contains more than 50 records.how can i write a script such that it will transmit the file after the file is created.i want to sed the file to say asdf@xyz.com. please help me... (2 Replies)
Discussion started by: dr46014
2 Replies

3. Shell Programming and Scripting

Send email on script error

I need to start off by saying that I am not much of a programmer and know enough to cause lots of trouble. I've been writing this script to decrypt an XML feed, then parse the feed into a database. The script is executed from cron. #!/bin/sh PGPPATH=/path/to/directory echo "pgp... (6 Replies)
Discussion started by: Aslan_Eident
6 Replies

4. Shell Programming and Scripting

send an email of script output

Hi All, I'm trying to send some file which generated by script to my email. when I run the script I'm getting an email. Thats fine. But it seems to be all messed up like below Memory Status on ServerA: Mem: 3867444k total, 862680k used, 3004764k free, 54456k buffers!! CPU Status on ServerA:... (4 Replies)
Discussion started by: s_linux
4 Replies

5. Shell Programming and Scripting

How to send email through shell script

Hi All, I am new to the unix , i have to deliver one script very urgently I have to write a shell script where i have i want to send email to specific email id in this script i want FROM to be parameterized and stored in a variable TO to be parameterized and stored in a variable... (3 Replies)
Discussion started by: nileshbhawsar
3 Replies

6. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

7. Shell Programming and Scripting

Help with shell script to send email once

Hi Guys, I have this script which will monitor oracle db process if up or down.And I want it to send email if it's down and the time it's back to online. However my script just keep on sending "Email Up" if the db is up or "Email Down" if the db is down.Is there any way to trap it so that it... (5 Replies)
Discussion started by: d3xt3r
5 Replies

8. Shell Programming and Scripting

Script to Send an email using mail command

Hello all I'm trying to write a script to send an email, so I can be nnotified when something is going wrong with my system. I've tried many options with no luck: mail -s "You've got mail" somebody@example.com echo "Mail Body" | mail -s "Subject" somebody@example.com I tried also to... (1 Reply)
Discussion started by: samer.odeh
1 Replies

9. Shell Programming and Scripting

Help....script check status if see something then send email

autorep -m bogus Machine Name Max Load Current Load Factor O/S Status ___________ ________ ___________ ______ ________ ______ bogus --- --- 1.00 Sys Agent Online Status ______ Online Offline Missing Unqualified The "Status" always "Online". I like create a script execute run... (6 Replies)
Discussion started by: dotran
6 Replies

10. Shell Programming and Scripting

Script to send email if count is >1

i have below code to count number of rows in file1.txt, if the row count is more than one then i have sending an email along with file1.txt attached and fail the process(do nothing if count is <=1), if I test individually count part works good but when i include the email part its not working,... (4 Replies)
Discussion started by: srini_106
4 Replies
PPI::Find(3pm)						User Contributed Perl Documentation					    PPI::Find(3pm)

NAME
PPI::Find - Object version of the Element->find method SYNOPSIS
# Create the Find object my $Find = PPI::Find->new( &wanted ); # Return all matching Elements as a list my @found = $Find->in( $Document ); # Can we find any matching Elements if ( $Find->any_matches($Document) ) { print "Found at least one matching Element"; } # Use the object as an iterator $Find->start($Document) or die "Failed to execute search"; while ( my $token = $Find->match ) { ... } DESCRIPTION
PPI::Find is the primary PDOM searching class in the core PPI package. History It became quite obvious during the development of PPI that many of the modules that would be built on top of it were going to need large numbers of saved, storable or easily creatable search objects that could be reused a number of times. Although the internal ->find method provides a basic ability to search, it is by no means thorough. PPI::Find attempts to resolve this problem. Structure and Style PPI::Find provides a similar API to the popular File::Find::Rule module for file searching, but without the ability to assemble queries. The implementation of a separate PPI::Find::Rule sub-class that does provide this ability is left as an exercise for the reader. The &wanted function At the core of each PPI::Find object is a "wanted" function that is passed a number of arguments and returns a value which controls the flow of the search. As the search executes, each Element will be passed to the wanted function in depth-first order. It will be provided with two arguments. The current Element to test as $_[0], and the top-level Element of the search as $_[1]. The &wanted function is expected to return 1 (positive) if the Element matches the condition, 0 (false) if it does not, and undef (undefined) if the condition does not match, and the Find search should not descend to any of the current Element's children. Errors should be reported from the &wanted function via die, which will be caught by the Find object and returned as an error. METHODS
new &wanted The "new" constructor takes a single argument of the &wanted function, as described above and creates a new search. Returns a new PPI::Find object, or "undef" if not passed a CODE reference. clone The "clone" method creates another instance of the same Find object. The cloning is done safely, so if your existing Find object is in the middle of an iteration, the cloned Find object will not also be in the iteration and can be safely used independently. Returns a duplicate PPI::Find object. in $Document [, array_ref => 1 ] The "in" method starts and completes a full run of the search. It takes as argument a single PPI::Element object which will serve as the top of the search process. Returns a list of PPI::Element objects that match the condition described by the &wanted function, or the null list on error. You should check the ->errstr method for any errors if you are returned the null list, which may also mean simply that no Elements were found that matched the condition. Because of this need to explicitly check for errors, an alternative return value mechanism is provide. If you pass the "array_ref =" 1> parameter to the method, it will return the list of matched Elements as a reference to an ARRAY. The method will return false if no elements were matched, or "undef" on error. The ->errstr method can still be used to get the error message as normal. start $Element The "start" method lets the Find object act as an iterator. The method is passed the parent PPI::Element object as for the "in" method, but does not accept any parameters. To simplify error handling, the entire search is done at once, with the results cached and provided as-requested. Returns true if the search completes, and false on error. match The "match" method returns the next matching Element in the iteration. Returns a PPI::Element object, or "undef" if there are no remaining Elements to be returned. finish The "finish" method provides a mechanism to end iteration if you wish to stop the iteration prematurely. It resets the Find object and allows it to be safely reused. A Find object will be automatically finished when "match" returns false. This means you should only need to call "finnish" when you stop iterating early. You may safely call this method even when not iterating and it will return without failure. Always returns true errstr The "errstr" method returns the error messages when a given PPI::Find object fails any action. Returns a string, or "undef" if there is no error. TO DO
- Implement the PPI::Find::Rule class SUPPORT
See the support section in the main module. AUTHOR
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.1 2011-02-26 PPI::Find(3pm)
All times are GMT -4. The time now is 02:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy