10-08-2009
What have you tried so far? There are tons of date arithemtic example and date comparisons etc. in the forum already - use the search function please and see if any of the examples help you.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everyone!
Can anyone help me with this?
I need a script that looks at a logfile and check itīs size. If itīs over a sertain size the i should get an email. Dont really know how the grep that info "the size"
Please help.... (4 Replies)
Discussion started by: dozy
4 Replies
2. Shell Programming and Scripting
how can i compare the latest log file with the current time..
consider i am running a script "a.sh" at 09:00
( function of the script a.sh is to update the database )
this script is going to create logfile if the script is sucess
in case of failure it is not going to create logfile..
... (0 Replies)
Discussion started by: mail2sant
0 Replies
3. Shell Programming and Scripting
Hi,
Now i work in a code that
1-get data stored in the database in the form of hash table with a key
field which is the " Name"
2-in the same time i open a txt file and loop through it word by word
3- which i have a problem in is that :
I need to loop word by word and check if it is a... (0 Replies)
Discussion started by: eng_shimaa
0 Replies
4. Shell Programming and Scripting
Hello All,
Morning,
I am facing problem with my code while creating a log with name as current time stamp using perl. Here is the code.
#!/usr/bin/perl
my $time=localtime;
my ($day,$month,$date,$tm,$year)=split(/ /,$time);
my $stamp=$year."_".$month."_".$date;
my... (4 Replies)
Discussion started by: krsnadasa
4 Replies
5. Shell Programming and Scripting
Hey all. I am working on some scripts in bash to perform a variety of functions; there are a variety of steps involved, and they must happen in a specific sequence; what I need help with is a way to calculate some differences in a timestamp in a logfile.
One of the steps in the scripts I am... (3 Replies)
Discussion started by: danowar
3 Replies
6. Shell Programming and Scripting
I've a list of files which got processed in Target table A and stored in a control file(list of control files).
I've want to trigger another process (later) based on this list of files and load into Target table B and continue running this process until this file list is exhuasted.
How do I come... (1 Reply)
Discussion started by: manojg9
1 Replies
7. Shell Programming and Scripting
Hi,
I have a wierd requirement where i need to check for a file transfered to my Server and once it is completed i need to start processing my jobs.
My server is AIX 6.0 and i want to know is there some way in unix i can keep on checking the file and once it is completed successfully i can... (5 Replies)
Discussion started by: prasson_ibm
5 Replies
8. Shell Programming and Scripting
Hi All,
Firstly thank you for the forum members I need to find time difference b'w two rows of timestamp using awk/shell.
Here is the logfile:
cat business_file
start:skdjh:22:06:2010:10:30:22
sdfnskjoeirg
wregn'wergnoeirnfqoeitgherg
end:siifneworigo:22:06:2010:10:45:34... (3 Replies)
Discussion started by: Srinivas Gadi
3 Replies
9. UNIX for Beginners Questions & Answers
I am trying to figure out to find word count of each word from my file
sample file
hi how are you
hi are you ok
sample out put
hi 1
how 1
are 1
you 1
hi 1
are 1
you 1
ok 1
wc -l filename is not helping , i think we will have to split the lines and count and then print and also... (4 Replies)
Discussion started by: mirwasim
4 Replies
10. UNIX for Beginners Questions & Answers
Guys i need an idea for one logic..in shell scripting am struggling with a logic...So the thing is... i need to search for a word in a huge log file and i need to continue to print few more lines from that line and the consecutive line has to end when it finds the line with date..because i know... (1 Reply)
Discussion started by: Prathi
1 Replies
LEARN ABOUT DEBIAN
atompub::datetime
Atompub::DateTime(3pm) User Contributed Perl Documentation Atompub::DateTime(3pm)
NAME
Atompub::DateTime - A date and time object for the Atom Publishing Protocol
SYNOPSIS
# assuming the local timezone is JST (+09:00)
use Atompub::DateTime qw(datetime);
$dt = datetime; # current time
$dt = datetime(DateTime->new);
$dt = datetime(1167609600); # UTC epoch value
$dt = datetime('20070101090000');
$dt = datetime('2007-01-01 09:00:00');
$dt = datetime('2007-01-01 00:00:00Z');
$dt = datetime('2007-01-01T09:00:00+09:00');
$dt = datetime('2007-01-01T00:00:00Z');
$dt = datetime('Mon, 01 Jan 2007 00:00:00 GMT');
$dt->epoch; # 1167609600 (UTC epoch value)
$dt->iso; # 2007-01-01 09:00:00 (in localtime)
$dt->isoz; # 2007-01-01 00:00:00Z
$dt->w3c; # 2007-01-01T09:00:00+09:00
$dt->w3cz; # 2007-01-01T00:00:00Z
$dt->str; # Mon, 01 Jan 2007 00:00:00 GMT
my $dt2 = datetime($dt); # copy
$dt == $dt2; # compare
"$dt"; # $dt->w3c
$dt->dt; # DateTime object
METHODS
Atompub::DateTime->new([ $str ])
Returns a datetime object representing the time $str. If the function is called without an argument, it will use the current time.
datetime([ $str ])
An alias for Atompub::DateTime->new
$datetime->epoch
Returns UTC epoch value.
1167609600
$datetime->iso
Returns a "YYYY-MM-DD hh:mm:ss"-formatted string representing time in the local time zone.
2007-01-01 09:00:00
$datetime->isoz
Returns a "YYYY-MM-DD hh:mm:ssZ"-formatted string representing Universal Time.
2007-01-01 00:00:00Z
$datetime->w3c
Returns a "YYYY-MM-DDThh:mm:ssTZ"-formatted string (W3C DateTime Format) representing time in the local time zone.
2007-01-01T09:00:00+09:00
$datetime->w3cz
Returns a "YYYY-MM-DDThh:mm:ssZ"-formatted string (W3C DateTime Format) representing Universal Time.
2007-01-01T00:00:00Z
$datetime->str
Returns a human readable representation.
Mon, 01 Jan 2007 00:00:00 GMT
$datetime->dt
An accessor for the internal DateTime object.
$datetime->tz
An accessor for the internal DateTime::TimeZone object.
$datetime->fmt
An accessor for the internal DateTime::Format object.
INTERNAL INTERFACES
$datetime->init
$datetime->_parse_timestamp
SEE ALSO
Atompub
AUTHOR
Takeru INOUE, <takeru.inoue _ gmail.com>
LICENCE AND COPYRIGHT
Copyright (c) 2007, Takeru INOUE "<takeru.inoue _ gmail.com>". All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
perl v5.14.2 2011-04-30 Atompub::DateTime(3pm)