10-19-2012
Script to create folder, copy file, and send email on success
I am very new to UNIX as well as scripting so please be gentle, haha.
I have a Linux client which has a mount point mapped to my /etc folder on a NetApp FAS system. I woudl like to be able to copy the hosts and rc files once a week from the FAS to a different location for backup.
When the copy happens I would like the script to create a folder based on the current date, then copy the rc and hosts file to that new folder. Once this copy is successful I would like a basic email to be sent to a DL to inform everyone that the copy succeeded.
Is this something that can be scripted?
Thank you!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
Hi,
I have a script which updates a repository which is run manually. When this happens either no or new files will be added to a specific folder. If there are new files that have been added, an email needs to be sent. How can i check a folder for any new files after the update repos script has... (0 Replies)
Discussion started by: acc01
0 Replies
3. Shell Programming and Scripting
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
4. UNIX for Advanced & Expert Users
Is there a way I can send a text file directly to my Drafts folder? (1 Reply)
Discussion started by: idontknow
1 Replies
5. Shell Programming and Scripting
Hi i created a cron job which invoke a shell script and output some content via email.
Some times these output are sent to the junk email folder. i want these mails to be sent to inbox with some specific font. what i have to do? (4 Replies)
Discussion started by: vidhyaS
4 Replies
6. Shell Programming and Scripting
Hi Friends,
Could you guys help me out of this problem... I need to send an email to all the users and the email has to be picked from the text file.
text file contains the no. of records like:
giridhar
224285
847333
giridhar276@gmail.com
ramana
84849
33884
venkata.ramana@gmail.com... (6 Replies)
Discussion started by: giridhar276
6 Replies
7. Shell Programming and Scripting
Hi All,
My requirement is as follows:
A file (say abc) will be having list of the .txt file names. I need to read this abc file line by line and rename the .txt file names inside it and move them to other folder/path.
Eg:
abc
-------
file1.txt
file2.txt
file3.txt
Output (should... (1 Reply)
Discussion started by: pavan.yadalla
1 Replies
8. Shell Programming and Scripting
Hello,
Trying to get a bash for files received on daily basis and want to copy those files to different directory and send an email notification if file exists then send the file counts else Alert with no file received.
FileName format: DailyTransaction_2015-03-09_ 200.csv before 200 their is... (1 Reply)
Discussion started by: krux_rap
1 Replies
9. Shell Programming and Scripting
HI All,
please help , i got same case . i want copy folder and directory create yesterday.
for sample below :
drwxr-xr-x 4 apps apps 33 Nov 23 04:00 xxxxxx@gmai.com
drwxr-xr-x 4 apps apps 33 Nov 23 04:00 yyyyyyy@gmail.com
drwxr-xr-x 4 apps apps 33 Nov 24 04:00... (2 Replies)
Discussion started by: fajar_3t3
2 Replies
10. UNIX for Beginners Questions & Answers
Here is the shell script which need to trigger a stored procedure and when the record count is 0 then it should capture in the log that 0 duplicate records are found and if it's more than 0 then log with no of records. Also if there is any sqlerror then it should write the same in the log file and... (17 Replies)
Discussion started by: senmng
17 Replies
LEARN ABOUT DEBIAN
geo::googleearth::pluggable::folder
Geo::GoogleEarth::Pluggable::Folder(3pm) User Contributed Perl Documentation Geo::GoogleEarth::Pluggable::Folder(3pm)
NAME
Geo::GoogleEarth::Pluggable::Folder - Geo::GoogleEarth::Pluggable::Folder object
SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new;
my $folder=$document->Folder(name=>"My Folder");
DESCRIPTION
Geo::GoogleEarth::Pluggable::Folder is a Geo::GoogleEarth::Pluggable::Base with a few other methods.
USAGE
my $folder=$document->Folder(); #add folder to $document
my $subfolder=$folder->Folder(); #add folder to $folder
METHODS
initialize
We overide the default "initialize" method in order to append the "plugins" method from Module::Pluggable on to the packages list of the
Method::Autoload package.
The "packages" property is what is needed by Method::Autoload package. The "plugins" method is what is provided by Module::Pluggable. So,
the Folder package now has available to it every method in the "Plugins" folder at runtime.
Folder
Constructs a new Folder object and appends it to the parent folder object. Returns the object reference if you need to make any setting
changes after construction.
my $folder=$folder->Folder(name=>"My Folder");
$folder->Folder(name=>"My Folder");
NetworkLink
Constructs a new NetworkLink object and appends it to the parent folder object. Returns the object reference if you need to make any
setting changes after construction.
$folder->NetworkLink(name=>"My NetworkLink", url=>"./anotherdoc.kml");
LookAt
Constructs a new LookAt object and returns the object reference to assign to other object "lookat" properties.
$document->LookAt(
latitude => $lat, #decimal degrees
longitude => $lon, #decimal degrees
range => $range, #meters
tilt => $tilt, #decimal degrees from veritical
heading => $header, #decimal degrees from North
);
type
Returns the object type.
my $type=$folder->type;
node
data
Pushes arguments onto data array and returns an array or reference that holds folder object content. This is a list of objects that
supports a type and structure method.
my $data=$folder->data;
my @data=$folder->data;
$folder->data($placemark);
open
BUGS
Please log on RT and send to the geo-perl email list.
LIMITATIONS
Due to limitations in Perl hashes, it is not possible to specify the order of certain elements and attributes in the XML.
TODO
SUPPORT
Try geo-perl email list.
AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Geo::GoogleEarth::Pluggable, Module::Pluggable Method::Autoload, XML::LibXML::LazyBuilder
perl v5.14.2 2011-06-26 Geo::GoogleEarth::Pluggable::Folder(3pm)