01-15-2009
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a situation where I need to delete multiple files from a folder once I connect to FTP server. I am using ftp script to get the files, number of files always vary from 1 to 100. once I get the files I need to delete all the files downloaded I am making a list of all the files... (4 Replies)
Discussion started by: mgirinath
4 Replies
2. Shell Programming and Scripting
Hi,
I am facing a weired problem in my FTP script. I want to transfer multiple files from remote server to local server everyday, using mget * in my script. I also, want to send an email for successful or failed FTP. My script works for file transfer, but it don't send any mail. There is... (2 Replies)
Discussion started by: berlin_germany
2 Replies
3. Filesystems, Disks and Memory
Hi ,
We are facing a weird problem in our project. we need to send some xml & audio files to a remote FTP server from a Linux box, we are doing this in Perl script using Net::FTP->. Issue here is.. when FTPed the files using Perl scripts, only empty files ( 0 byte) are getting created on the... (2 Replies)
Discussion started by: kishorepotta
2 Replies
4. Shell Programming and Scripting
script for to take files from FTP server to UNIX server and Unzipped that files (1 Reply)
Discussion started by: sunilamarnadh
1 Replies
5. UNIX for Advanced & Expert Users
Iam putting file in ftp server.
iam doing ftp
to transfer a file to ftp server
but after sometime(10 sec) the file is automatically deleting in the ftp.
Can i know why this happens.
When my friend ftp the file to the same server , the file is not deleting aftersometime... it is there.
Can... (1 Reply)
Discussion started by: nani1984
1 Replies
6. Shell Programming and Scripting
I am trying to FTP files to a Windows server through my Linux machine. I have setup the file transfer with no problems but am having problem deleting those files from the Linux box. My current non-working solution is below. Any ideas, anyone?? :wall: Please be gentle, I'm fairly new to this... (4 Replies)
Discussion started by: jmalfhs
4 Replies
7. Shell Programming and Scripting
Hi,
I'm new to shell script..I have one requriement like -
In one server have more than one files,I want to ftp those files to some otehr server..
Ex : test1.pdf
test2.pdf
Please suggest me how to do (3 Replies)
Discussion started by: venkaswa
3 Replies
8. Solaris
I need to transfer files from a Windows server to the Unix server and have to run some shell script on it to get the required output.
Is it possible to transfer files from Windows server to unix server through any shell script?
If so can you please help me with the details.
Thanks in... (8 Replies)
Discussion started by: ssk250
8 Replies
9. Shell Programming and Scripting
Hi,
I want to delete a file on the local server, while connected to remote server through FTP.
I am using the below code for this
$FTP_CMD -v -n $HOST <<*! >> $LOGFILE 2>&1
user $USER $PASSWORD
cd $DIR
... (11 Replies)
Discussion started by: jhilmil
11 Replies
10. Shell Programming and Scripting
Hello,
I have a server that I have to ftp files off and they all start SGRD and are followed by 6 numbers.
SGRD000001
SGRD000002
SGRD000003
The script I have will run every 10 mins to pick up files as new ones will be coming in all the time and what I want to do is delete the files I have... (7 Replies)
Discussion started by: sph90457
7 Replies
LEARN ABOUT DEBIAN
file::find::object::rule::extending
File::Find::Object::Rule::Extending(3pm) User Contributed Perl Documentation File::Find::Object::Rule::Extending(3pm)
NAME
File::Find::Object::Rule::Extending - the mini-guide to extending File::Find::Object::Rule
SYNOPSIS
package File::Find::Object::Rule::Random;
use strict;
use warnings;
# take useful things from File::Find::Object::Rule
use base 'File::Find::Object::Rule';
# and force our crack into the main namespace
sub File::Find::Object::Rule::random () {
my $self = shift()->_force_object;
$self->exec( sub { rand > 0.5 } );
}
1;
DESCRIPTION
File::Find::Object::Rule inherits File::Find::Rule's extensibility. It is now possibile to extend it, using the following conventions.
Declare your package
package File::Find::Object::Rule::Random;
use strict;
use warnings;
Inherit methods from File::Find::Object::Rule
# take useful things from File::Find::Object::Rule
use base 'File::Find::Object::Rule';
Force your madness into the main package
# and force our crack into the main namespace
sub File::Find::Object::Rule::random () {
my $self = shift()->_force_object;
$self->exec( sub { rand > 0.5 } );
}
Yes, we're being very cavalier here and defining things into the main File::Find::Object::Rule namespace. This is due to lack of
imaginiation on my part - I simply can't find a way for the functional and oo interface to work without doing this or some kind of
inheritance, and inheritance stops you using two File::Find::Object::Rule::Foo modules together.
For this reason try and pick distinct names for your extensions. If this becomes a problem then I may institute a semi-official registry
of taken names.
Taking no arguments.
Note the null prototype on random. This is a cheat for the procedural interface to know that your sub takes no arguments, and so allows
this to happen:
find( random => in => '.' );
If you hadn't declared "random" with a null prototype it would have consumed "in" as a parameter to it, then got all confused as it doesn't
know about a '.' rule.
NOTES ABOUT THE CALLBACK
The callback can access the File::Find::Object::Result using "$self->finder->item_obj()".
AUTHOR
Richard Clamp <richardc@unixbeard.net>
COPYRIGHT
Copyright (C) 2002 Richard Clamp. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
File::Find::Object::Rule
File::Find::::Rule::MMagic was the first extension module for File::Find::Rule, so maybe check that out.
perl v5.14.2 2012-05-05 File::Find::Object::Rule::Extending(3pm)