Sponsored Content
Full Discussion: Extracting Logfile Entries
Top Forums Shell Programming and Scripting Extracting Logfile Entries Post 302079721 by harpdl on Wednesday 12th of July 2006 12:58:55 PM
Old 07-12-2006
Extracting Logfile Entries

Hello All,

I am trying to write a KSH script that would extract lines from a logfile, within a certain timeframe, in reverse order.

Ex.
-Sample logfile-
INFO 2006-07-12 00:23:00 - ModeDecision Time in WF:27
INFO 2006-07-12 00:24:00 - NRT_MQ_RES:108
INFO 2006-07-12 00:25:00 - getRecords() :R4000 :37
INFO 2006-07-12 00:26:00 - ModeDecision Time in WF:43
INFO 2006-07-12 00:27:00 - JDBC [PADRECORD] : 5

From the sample logfile above, I am needing to extract the lines starting from '00:27:00' to three minutes prior (00:24:00). I could not find anything from the 'date' command that would reverse time.

Any help would be greatly appreciated!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sort a logfile

Hi experts, I need help to sort a big logfile. logfile: ------- 67712 dkjd jd jj jjjj ------ kjkj jhjh kkk yggg lll hhh gffgf jj -------- i kkk kllkkl ------- Now I want every think between the "------" in one line. Normaly with paste no problem but you can see that the... (7 Replies)
Discussion started by: joerg
7 Replies

2. Shell Programming and Scripting

logfile

hi iam new of the ksh script.iwant in formation of how to call in logfile in ksh scripts. if the meaning in ksh. please help me thanks naveen.g (1 Reply)
Discussion started by: naveeng.81
1 Replies

3. Shell Programming and Scripting

Logfile - extracting certain lines to concatenate into 1 line

I've got a log file from automatic diagnostic runs. The log file is appended to each time an automatic log is run. I'd like to just pull certain lines from each run in the log file, and concatenate them into 1 comma delimited line (for export into excel or an html table). Each diagnostic run... (3 Replies)
Discussion started by: BecTech
3 Replies

4. Shell Programming and Scripting

Extracting data from two date entries

Hi again: I have this file: "2010-11-1 11:50:00",40894,13.38,17.24,12.92,13.23,"2010-11-14 11:43:02",12.56,"2010-11-14 11:46:02",22.68,20.95,"2010-11-14 11:44:03",2.144,2.078,190.4,14.27,6.293,"2010-11-14 ... (2 Replies)
Discussion started by: iga3725
2 Replies

5. Shell Programming and Scripting

extracting data froma logfile

You are given a 1 year logfile with each line starting with a date in the form “YYYY-MM-DD”. How would you extract logs from the 4th day of each month and put them into a new file (3 Replies)
Discussion started by: DOkuwa
3 Replies

6. Shell Programming and Scripting

Extracting log entries from a date onwards

One of the log file looks like entries as below. Wed Apr 6 14:51:18 2011 FAIL LOGIN: Client "9.191.21.54" Wed Apr 6 14:52:53 2011 CONNECT: Client "9.191.21.54" Wed Apr 6 14:52:54 2011 OK LOGIN: Client "9.191.21.54" Wed Apr 6 14:55:10 2011 CONNECT: Client "9.191.21.54" Wed Apr 6... (2 Replies)
Discussion started by: rijeshpp
2 Replies

7. Shell Programming and Scripting

Logfile Reading

I am reading through a log file that has multiple entries: xx-xxxx-xxx-130111090001 <XML> ... ... </XML> ... ... ... xx-xxxx-xxx-130111100001 <XML> ... ... </XML> There are 2 parts: 1) Take the XML statement and parse out. I have that with a sed script sed -n '/<XML>/,/XML>/p'... (6 Replies)
Discussion started by: SivaAfi
6 Replies

8. Shell Programming and Scripting

Extracting entries starting with xxx

Hello, I am trying to extract all words (entries) from a file beginning with 123. For example: ververv ewfaafa 123asd 4334j fdgfgf fdfdssd 123890 xxxxx eeee sss 1234 sdfsf were sfs fbdsdfb fsdg sdgfsd bfg sdfb dsfb sdfg sdf ergerg 123pop sdfgdfg 123ww 123qq dffg Desired output: 123asd... (4 Replies)
Discussion started by: palex
4 Replies

9. Shell Programming and Scripting

Logfile monitoring with logfile replacement

Bonjour, I've wrote a script to monitor a logfile in realtime. It is working almost perfeclty except for two things. The script use the following technique : tail -fn0 $logfile | \ while read line ; do ... some stuff done First one, I'd like a way to end the monitoring script if a... (3 Replies)
Discussion started by: Warluck
3 Replies

10. UNIX for Dummies Questions & Answers

Selectively extracting entries from FASTA file

I would like to extract all entries containing the following patterns: ccccta & ccccccccc from the following infile: >P39PT-1224_Freq_900 cccctacgacggcattggtaatggctcccgcaagccatctctcttcagccaagg >P39PT-784_Freq_2 cccctacgacggcattggtaatggcacccgcaagccatctctcttccccccccc >P39PT-678_Freq_5... (4 Replies)
Discussion started by: Xterra
4 Replies
dsterf.f(3)							      LAPACK							       dsterf.f(3)

NAME
dsterf.f - SYNOPSIS
Functions/Subroutines subroutine dsterf (N, D, E, INFO) DSTERF Function/Subroutine Documentation subroutine dsterf (integerN, double precision, dimension( * )D, double precision, dimension( * )E, integerINFO) DSTERF Purpose: DSTERF computes all eigenvalues of a symmetric tridiagonal matrix using the Pal-Walker-Kahan variant of the QL or QR algorithm. Parameters: N N is INTEGER The order of the matrix. N >= 0. D D is DOUBLE PRECISION array, dimension (N) On entry, the n diagonal elements of the tridiagonal matrix. On exit, if INFO = 0, the eigenvalues in ascending order. E E is DOUBLE PRECISION array, dimension (N-1) On entry, the (n-1) subdiagonal elements of the tridiagonal matrix. On exit, E has been destroyed. INFO INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value > 0: the algorithm failed to find all of the eigenvalues in a total of 30*N iterations; if INFO = i, then i elements of E have not converged to zero. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Definition at line 87 of file dsterf.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.2 Tue Sep 25 2012 dsterf.f(3)
All times are GMT -4. The time now is 08:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy