Sponsored Content
Top Forums Shell Programming and Scripting Extract data from log file from or after the specific date Post 302308918 by chiru_h on Monday 20th of April 2009 03:24:23 PM
Old 04-20-2009
Thanks Franklin, it doesn't work if the date is not present in the log file, but if the date is in the log file, it works like a charm.

Any insight?

Thanks,
Chiru
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extract specific data from xml format file.

Hi, I need to extract the start time value (bold, red font) under the '<LogEvent ID="Timer Start">' tag (black bold) from a file with the following pattern. There are other LogEventIDs listed in the file as well, making it harder for me to extract out the specific start time that I need. . .... (7 Replies)
Discussion started by: 60doses
7 Replies

2. Shell Programming and Scripting

Extract data into file with specific field specs

:confused: I have a tab delimited file that I need to extract data from and into a file with specific field specs. Each field has to be a certain amount of characters. So, the name field (from delimited file) might have only 15 characters but needs to be 25 (in new file) so I need to insert spaces... (5 Replies)
Discussion started by: criddel
5 Replies

3. Shell Programming and Scripting

How to extract specific data and count number containing sets from a file?

Hello everybody! I am quit new here and hope you can help me. Using an awk script I am trying to extract data from several files. The structure of the input files is as follows: TimeStep parameter1 parameter2 parameter3 parameter4 e.g. 1 X Y Z L 1 D H Z I 1 H Y E W 2 D H G F 2 R... (2 Replies)
Discussion started by: Daniel8472
2 Replies

4. Shell Programming and Scripting

How to extract log data based on date

Hi Gurus, I've been having some problem in extracting the log data based on the current date and month. As shown in the sample data below, how to extract the log info for Aug 11? Sample data: root pts/ta userpc Wed Aug 11 09:46 - 20:21 (10:35) root pts/ta userpc... (13 Replies)
Discussion started by: superHonda123
13 Replies

5. Shell Programming and Scripting

How to extract log data based on current date and month ?

Hi Gurus, I'm using HP-UX B.11.23 operating system. I've been trying to extract this log info based on the current date and month, but was having some issues as the date column which on the 4th column has a comma and the 5th column has a dot tied to it. Here is the output from my shut... (5 Replies)
Discussion started by: superHonda123
5 Replies

6. Shell Programming and Scripting

Search for a specific data in a file based on a date range

Hi, Currently I am working on a script to automate the process of converting the log file from binary into text format. To achieve this, partly I am depending on my application’s utility for this conversion and the rest I am relying on shell commands to search for directory, locate the file and... (5 Replies)
Discussion started by: svajhala
5 Replies

7. Shell Programming and Scripting

Extract Specific pattern - log file

Hello everyone, I am on AIX (6.1). I can only use shell (ksh) script. I can't do this on my own, so will do my best to explain my needs.I also do not know what is the best idea to make it work, so here is what I am thinking, but I may wrong. I need help to extract info on... (3 Replies)
Discussion started by: Aswex
3 Replies

8. UNIX for Dummies Questions & Answers

Extract date ranged data from log file

Hi, I am trying to extract lines of data within a log file on a Redhat 5 Linux system. eg I need all the lines with a particular username over the last 3 minutes. the log file may read like this, and I want a way to search all the lines extracting all the relevant lines over the last 3... (2 Replies)
Discussion started by: mantis100
2 Replies

9. UNIX for Dummies Questions & Answers

Search for a specific String in a log file for a specific date range

Hi, I have log file which rolls out every second which is as this. HttpGenRequest - -<!--OXi dbPublish--> <created="2014-03-24 23:45:37" lastMsgId="" requestTime="0.0333"> <response request="getOutcomeDetails" code="114" message="Request found no matching data" debug="" provider="undefined"/>... (3 Replies)
Discussion started by: karthikprakash
3 Replies

10. Shell Programming and Scripting

How-To Extract specific data from a file.

data.txt has several information like the below.. <SERVER>:WEB:MYDOM01:/tmp/cong/MYDOM01,/tmp/app/MYDOM01 <WEBER>:CANES:https-web01,https-web02:/web/apps/https-web01/config <SERVER>:WEB:MYDOM07:/tmp/cong/MYDOM07,/tmp/app/MYDOM07... (7 Replies)
Discussion started by: mohtashims
7 Replies
doctools::cvs(n)						Documentation tools						  doctools::cvs(n)

__________________________________________________________________________________________________________________________________________________

NAME
doctools::cvs - Processing text in 'cvs log' format SYNOPSIS
package require Tcl 8.2 package require textutil package require doctools::cvs ?1? ::doctools::cvs::scanLog text evar cvar fvar ::doctools::cvs::toChangeLog evar cvar fvar _________________________________________________________________ DESCRIPTION
This package provides Tcl commands for the processing and reformatting text in the format generated by the cvs log command. The commands ::doctools::cvs::scanLog and ::doctools::cvs::toChangeLog are derived from code found on the Tcl'ers Wiki [http://wiki.tcl.tk]. See the references at the end of the page. API
::doctools::cvs::scanLog text evar cvar fvar The command takes the text and parses it under the assumption that it contains a CVS log as generated by cvs log. The resulting information is stored in the variables whose names were specified via evar, cvar, and fvar. Already existing information in the referenced variables is preserved, allowing the caller to merge data from multiple logs into one database. varname evar (in) Has to refer to a scalar variable. After the call this variable will contain a list of all the entries found in the log file. An entry is identified through the combination of date and author, and can be split over multiple physical entries, one per touched file. It should be noted that the entries are listed in the same order as they were found in the text. This is not necessarily sorted by date or author. Each item in the list is a list containing two elements, the date of the entry, and its author, in this order. The date is formatted as year/month/day. varname cvar (in) Has to refer to an array variable. Keys are strings containing the date and author of log entries, in this order, separated by a comma. The values are lists of comments made for the entry. varname fvar (in) Has to refer to an array variable. Keys are strings containing date, author of a log entry, and a comment for that entry, in this order, separated by commas. The values are lists of the files the entry is touching. ::doctools::cvs::toChangeLog evar cvar fvar ] The three arguments for this command are the same as the last three arguments of the command ::doctools::cvs::scanLog. This com- mand however expects them to be filled with information about one or more logs. It takes this information and converts it into a text in the format of a ChangeLog as accepted and generated by emacs. The constructed text is returned as the result of the command. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category doctools of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. SEE ALSO
http://wiki.tcl.tk/log2changelog KEYWORDS
changelog, cvs, cvs log, emacs, log COPYRIGHT
Copyright (c) 2003-2008 Andreas Kupries <andreas_kupries@users.sourceforge.net> doctools 1 doctools::cvs(n)
All times are GMT -4. The time now is 07:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy