How to script to find the newer date in a text file?
Hi,
I have a text file, foo.txt, it looks something like below. In the file there is a line that gives the date in the form of: Mon Jun 15 11:09:31 2008. I need to find which date is the newest and then store certain details of that list data to another file. So, in this sample text file, I need the data from add, mob and tele from List #1 into another file called foo1.txt because List # 1 is the newest and those three attributes are the only ones I ever need.
Hi,
I would like to find if a file called test.log is older than 10 min.
So i wrote :
#!/usr/bin/ksh
FICLOG="/home/uuu/result_test.log"
FIC="/home/uuu/test.log"
touch -t `perl -e 'use POSIX qw(strftime); printf("%s\n",strftime("%m%d%H%M",localtime(time-3600*0.17)));'`... (3 Replies)
Hey Guyz I have a requirement something like this..
a part of file name, date of modification of that file and a text is entered as input.
like
Date : 080206 (MMDDYY format.)
filename : hotel_rates
text : Jim
now the file hotel_rates.ZZZ.123 (creation date is Aug 02 2006) should be... (10 Replies)
I am running SUSE/8 and SUSE/9 on a high end server (4 CPU, 8G RAM etc)
I have a huge directory structure with over 4million files in it. I have find the files that are modified (created, modified, renamed etc etc) in the last 10 minutes periodically.
I have tried "find -cmin -10" and "find... (2 Replies)
I am writing a script that looks in a reports directory, copies a specified script to a working folder, copies some data files into the working folder, runs the report, zips the new files, then uploads them.
Right now to determine what files to zip (as I don't know how many report files there... (6 Replies)
This should be a simple script, but can't find one with google search.
I just need to find the file that is in many directories, then overwrite that file with a newer version i.e.
find file.jar then overwrite with /root/file.jar
All I get in searches is substitute text with new test inside... (1 Reply)
We had an arrant rsync run and started copying over new files from one system to another.
Although this is what we will want to do at some point, for now, we want to maintain the system as it was a few days ago.
I am looking for a script that will find files that are newer than x days.
... (5 Replies)
The 6th & 7th column of the text files represents date & time. I need this to be converted in julian format using command "date +%s -d <date>". I know the command, but dont know how to use it on the script
0 dbclstr-b IXT_Web Memphis_Prod_SQL_Full Memphis-Prod-SQL-Full-Application-Backup... (4 Replies)
Hello,
Can you please help me one this:
I have two servers: Server A and server B.
Every day on 03.00AM in only one on these two servers (randomly)is generated one file, lets say file.txt.
I want to copy this file also to the other server.
I want to create a perl script that does... (2 Replies)
Discussion started by: arrals_vl
2 Replies
LEARN ABOUT DEBIAN
anyevent::xmpp::ext::registration
AnyEvent::XMPP::Ext::Registration(3pm) User Contributed Perl Documentation AnyEvent::XMPP::Ext::Registration(3pm)NAME
AnyEvent::XMPP::Ext::Registration - Handles all tasks of in band registration
SYNOPSIS
my $con = AnyEvent::XMPP::Connection->new (...);
$con->reg_cb (stream_pre_authentication => sub {
my ($con) = @_;
my $reg = AnyEvent::XMPP::Ext::Registration->new (connection => $con);
$reg->send_registration_request (sub {
my ($reg, $form, $error) = @_;
if ($error) {
# error handling
} else {
my $af = $form->try_fillout_registration ("tester", "secret");
$reg->submit_form ($af, sub {
my ($reg, $ok, $error, $form) = @_;
if ($ok) { # registered successfully!
$con->authenticate
} else { # error
if ($form) { # we got an alternative form!
# fill it out and submit it with C<submit_form> again
}
}
});
}
});
0
});
DESCRIPTION
This module handles all tasks of in band registration that are possible and specified by XEP-0077. It's mainly a helper class that eases
some tasks such as submitting and retrieving a form.
METHODS
new (%args)
This is the constructor for a registration object.
connection
This must be a AnyEvent::XMPP::Connection (or some other subclass of that) object.
This argument is required.
send_registration_request ($cb)
This method sends a register form request. $cb will be called when either the form arrived or an error occured.
The first argument of $cb is always $self. If the form arrived the second argument of $cb will be a AnyEvent::XMPP::Ext::RegisterForm
object. If an error occured the second argument will be undef and the third argument will be a AnyEvent::XMPP::Error::Register object.
For hints how AnyEvent::XMPP::Ext::RegisterForm should be filled out look in XEP-0077. Either you have legacy form fields, out of band
data or a data form.
See also try_fillout_registration in AnyEvent::XMPP::Ext::RegisterForm.
send_unregistration_request ($cb)
This method sends an unregistration request.
For description of the semantics of the callback in $cb plase look in the description of the "submit_form" method below.
send_password_change_request ($username, $password, $cb)
This method sends a password change request for the user $username with the new password $password.
For description of the semantics of the callback in $cb plase look in the description of the "submit_form" method below.
submit_form ($form, $cb)
This method submits the $form which should be of type AnyEvent::XMPP::Ext::RegisterForm and should be an answer form.
$con is the connection on which to send this form.
$cb is the callback that will be called once the form has been submitted and either an error or success was received. The first
argument to the callback will be the AnyEvent::XMPP::Ext::Registration object, the second will be a boolean value that is true when the
form was successfully transmitted and everything is fine. If the second argument is false then the third argument is a
AnyEvent::XMPP::Error::Register object. If the error contained a data form which is required to successfully make the request then the
fourth argument will be a AnyEvent::XMPP::Ext::RegisterForm which you should fill out and send again with "submit_form".
For the semantics of such an error form see also XEP-0077.
AUTHOR
Robin Redeker, "<elmex at ta-sa.org>", JID: "<elmex at jabber.org>"
COPYRIGHT & LICENSE
Copyright 2007, 2008 Robin Redeker, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-01-23 AnyEvent::XMPP::Ext::Registration(3pm)