Re: How to compare timestamp in two different files(regex)

2018-10-22 Thread Asad
Hi All , first hurdle is how do I extract this Feb 23 01:10:28 2018 from file1 which regex can I use ? convert it into epoch then regex for 02/23/18 01:10:33 is required ? convert into epoch So if you can suggest the correct regex for both t

Re: How to compare timestamp in two different files

2018-10-22 Thread Илья Рассадин
use Time::Piece; my $t1 = Time::Piece->strptime('Feb 23 01:10:28 2018', '%b %d %H:%M:%S %Y'); my $t2 = Time::Piece->strptime('02/23/18 01:10:33', '%m/%d/%y %H:%M:%S'); if ($t1 > $t2) { ... } On 23/10/2018 09:17, Asad wrote: Hi All ,         first hurdle is how do I extract this Feb 23 01:10:

RE: How to compare timestamp in two different files

2018-10-22 Thread Duncan Ferguson
In the past I have used the DateTime module to good effect for this. There are a number of additional modules you can use that parse the string for you that match specific types of string format (such as ISO8601) or your own timestamp definition. https://github.com/houseabsolute/DateTime.pm/wi

Re: How to compare timestamp in two different files

2018-10-22 Thread Asad
Hi All , first hurdle is how do I extract this Feb 23 01:10:28 2018 from file1 which regex can I use ? convert it into epoch then regex for 02/23/18 01:10:33 is required ? convert into epoch So if you can suggest the correct regex for both t

Re: How to compare timestamp in two different files

2018-10-22 Thread Asad
Thanks, I will do that. It was for perl . On Tue, Oct 23, 2018 at 10:42 AM Jim Gibson wrote: > On Oct 22, 2018, at 9:12 PM, Asad wrote: > > > > file1 : > > Patching tool version 12.1.0.2.0 Production on Fri Feb 23 01:10:28 2018 > > > > Bootstrapping registry and package to current versions...do

Re: How to compare timestamp in two different files

2018-10-22 Thread Jim Gibson
On Oct 22, 2018, at 9:12 PM, Asad wrote: > > file1 : > Patching tool version 12.1.0.2.0 Production on Fri Feb 23 01:10:28 2018 > > Bootstrapping registry and package to current versions...done > statement ERR-2001: table is corrupt check for cause > > could not determine the current status. >

How to compare timestamp in two different files

2018-10-22 Thread Asad
file1 : Patching tool version 12.1.0.2.0 Production on Fri Feb 23 01:10:28 2018 Bootstrapping registry and package to current versions...done statement ERR-2001: table is corrupt check for cause could not determine the current status. file2 : LOG file opened at 02/03/18 01:11:05 DUP-05004: