troubleshooting Question

korn shell large ascii text file to perform some calc on

Avatar of jaysilverheels
jaysilverheels asked on
Linux
4 Comments1 Solution375 ViewsLast Modified:
I have an ascii text file below which is 80% time stamps and i would like to go through this file in ksh (i'ts very large) and check when there is a difference of more than thirty seconds between each event. Not sure how to do this.
--------------------------------------------------------------------------------------------------------------------------------
Here is the file:
kernel: MC0: Removed device 0 for Athlon64/Opteron: PCI 0000:00:18.2 (0000:00:18.2)
kernel: MC1: Removed device 1 for k8_edac Athlon64/Opteron: PCI 0000:00:19.2

close log:Wed Sep 12 11:15:39 CEST 2008
close log:Wed Sep 12 11:16:09 CEST 2008
close log:Wed Sep 12 11:16:39 CEST 2008
close log:Wed Sep 12 11:17:09 CEST 2008
close log:Wed Sep 12 11:17:39 CEST 2008
..
...
..
close log:Wed Sep 12 11:18:39 CEST 2008
close log:Wed Sep 12 11:10:39 CEST 2008
close log:Wed Sep 12 11:20:39 CEST 2008
close log:Wed Sep 12 11:21:39 CEST 2008
close log:Wed Sep 12 11:22:39 CEST 2008
close log:Wed Sep 12 11:23:39 CEST 2008
close log:Wed Sep 12 11:24:39 CEST 2008
...
...
-----------------------------------------------------------------------------------------------------------------------
What I can tell you is that
awk '{print $1}' is close
awk '{print $2}' is log:Wed
awk '{print $3}' is Sep
awk '{print $4}' is 12
awk '{print $5}' is <time>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros