Sponsored Content
Top Forums Shell Programming and Scripting read data from file from a specific duration Post 302564520 by gpk_newbie on Thursday 13th of October 2011 10:15:49 PM
Old 10-13-2011
read data from file from a specific duration

Hi,

i have log file which keeps on updating almost ever minute but i have certain string in log which will only be displayed between specific time. so i need to search for that string and copy the details starting from that string and stop at certain string below that.
example: log file contains as below
1243
123214
wtewds
243243
starting update
1234 records updated
985 records updated
10 records updated
final update
400 records updated
update completed
df[lsfadmgld
df
asdfg
ds'g
sd'g
ds
g'sd'g
sdg
starting update
134 records updated
85 records updated
104 records updated
final update
450 records updated
update completed
mb dmnb
mflmfnbvc
svmdknb
sd,vfl;sb


i need to copy the contents of this log file starting from "starting update" till "update completed" into another file. these lines will be displayed almost 20 to 30 times in a day but i need to search for a specific duration say 6pm to 11pm and i need to copy for this duration irrespective of number of times the string are displayed.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to read a specific value from a Log file?

Hi, I have a .log file in which it has many values. But i need some specific values. How it can be done using Shell Script. Please explain in detail. Thankx in advance. Sathish D V. (8 Replies)
Discussion started by: cooolthud
8 Replies

2. Shell Programming and Scripting

Read Write byte range/chunk of data from specific location in file

I am new to Unix so will really appreciate if someone can guide me on this. What I want to do is: Step1: Read binary file - pick first 2 bytes, convert from hex to decimal. Read the next 3 bytes as well. 2 bytes will specify the number of bytes 'n' that I want to read and write... (1 Reply)
Discussion started by: Kbenipel
1 Replies

3. Shell Programming and Scripting

Extract specific read from a data

Input file: #abc_1 SAASFASFGGDSGDSGDSGSDGSDGSDGSDGSDGSDGSDGDS Output file: FASFGGDSGDS I just want to print out the read from position 5 until position 15 from the data. Below is the code that I just try but it is failed to get my desired output: grep -v '#' input_file | awk... (5 Replies)
Discussion started by: patrick87
5 Replies

4. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

5. Shell Programming and Scripting

Read in specific lines in a file

I have a text file First title line name1 name2 name3 name4 (etc) other lines other lines other lines I want to read in this text file and parse the name1...name4 to a variable. How do I specificially read in these lines and these lines only? (10 Replies)
Discussion started by: piynik
10 Replies

6. Shell Programming and Scripting

To read specific line from a file

Hi, I have a ldif file like below: version: 1 dn: cn=Test Group,ou=Applications,dc=xyz,dc=com objectClass: groupOfUniqueNames objectClass: top cn: Test Group uniqueMember: uid=abc,ou=People,o=xyz,o=Corporate,dc=xyz,dc=com dn: cn=Test Sub Group,cn=Test... (4 Replies)
Discussion started by: saurau
4 Replies

7. Shell Programming and Scripting

How to read data from tab delimited file after a specific position?

Hi Experts, I have a tab deliminated file as below myfile.txt Local Group Memberships *Administrators *Guests I need data in below format starting from 4th position. myfile1.txt Administrators Guests the above one is just an example and there could... (15 Replies)
Discussion started by: Litu1988
15 Replies

8. Shell Programming and Scripting

How to read all data after a specific string from a text file ?

Hi, I have a file(input.txt) and trying to format as output.txt. See the attached file format. Note: This is a windows file (DOS format) and the commands are also going to execute on windows. Basically I am trying to capture all the data in between Local Group Memberships and Global Group... (10 Replies)
Discussion started by: Monoj2014
10 Replies

9. Shell Programming and Scripting

In PErl script: need to read the data one file and generate multiple files based on the data

We have the data looks like below in a log file. I want to generat files based on the string between two hash(#) symbol like below Source: #ext1#test1.tale2 drop #ext1#test11.tale21 drop #ext1#test123.tale21 drop #ext2#test1.tale21 drop #ext2#test12.tale21 drop #ext3#test11.tale21 drop... (5 Replies)
Discussion started by: Sanjeev G
5 Replies
KPROPLOG(8)						      System Manager's Manual						       KPROPLOG(8)

NAME
kproplog - display the contents of the Kerberos principal update log SYNOPSIS
kproplog [-h] [-e num] DESCRIPTION
The kproplog command displays the contents of the Kerberos principal update log to standard output. It can be used to keep track of the incremental updates to the principal database, when enabled. The update log file contains the update log maintained by the kadmind process on the master KDC server and the kpropd process on the slave KDC servers. When updates occur, they are logged to this file. Subsequently any KDC slave configured for incremental updates will request the current data from the master KDC and update their principal.ulog file with any updates returned. The kproplog command can only be run on a KDC server by someone with privileges comparable to the superuser. It will display update entries for that server only. If no options are specified, the summary of the update log is displayed. If invoked on the master, all of the update entries are also dis- played. When invoked on a slave KDC server, only a summary of the updates are displayed, which includes the serial number of the last update received and the associated time stamp of the last update. OPTIONS
-h Display a summary of the update log. This information includes the database version number, state of the database, the number of updates in the log, the time stamp of the first and last update, and the version number of the first and last update entry. -e num Display the last num update entries in the log. This is useful when debugging synchronization between KDC servers. -v Display individual attributes per update. An example of the output generated for one entry: Update Entry Update serial # : 4 Update operation : Add Update principal : test@EXAMPLE.COM Update size : 424 Update committed : True Update time stamp : Fri Feb 20 23:37:42 2004 Attributes changed : 6 Principal Key data Password last changed Modifying principal Modification time TL data SEE ALSO
kpropd(8) KPROPLOG(8)
All times are GMT -4. The time now is 11:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy