Sponsored Content
Top Forums Shell Programming and Scripting How to read a specific value from a Log file? Post 302104736 by cooolthud on Saturday 27th of January 2007 07:02:00 AM
Old 01-27-2007
Quote:
Originally Posted by tayyabq8
Please post here a sample log file and the specific values you are looking for. Please be little more specific, if you want a general answer then I can tell you that to look for specific values in a specific log file there are many tools, like grep, sed, awk, perl, bash, ksh, sh whatsoever suits you.

Regards,
Tayyab
Hi the log file looks like below:

Database Name AAALog BBB Log
#===================================================================#
XXXXXX S0000993.LOG S0000992.LOG
YYYYYY S0002549.LOG S0002549.LOG

I need to print only the difference of the S0000993.LOG and S0000992.LOG using Shell script. If we open 123.log then the output looks as above shown.

Can u suggest how to do this?
Thanks
Sathish D V
 

10 More Discussions You Might Find Interesting

1. Programming

How to read specific lines in a bulk file using C file Programming

Please Help me I have a Bulk file containing Hex data I want to read specific lines from that bulk file by ID number. example ID DATE Time data 14 2005/09/28 07:40:08.546 0 5 078B1C 01916C 0FE59C 004B54 0A9670 0D04ED 05B6B4 0E2223... (10 Replies)
Discussion started by: rajan_ka1
10 Replies

2. Shell Programming and Scripting

read specific text from a log file

Hi guys I need to retrieve the values in BOLD that I have mentioned in the below log file. I want to store those values in a variable, preferably the same name as the column name in the log file. if you paste the below mentioned log file in a notepad and remove the word wrap.. u will get a... (4 Replies)
Discussion started by: ragha81
4 Replies

3. Shell Programming and Scripting

read from a specific pattern from one file and append it to another

Hi! Everyone, Say this file1 -------------- line 1 51610183 420001010 0010CTCTLEDPPOO 2151610183 line 2 2151610183 420001010 0030A2TH2 line 3 2151610183 420001010 0040A2TH3 line 4 2151610183 420001010 ... (0 Replies)
Discussion started by: kinkar_ghosh
0 Replies

4. Shell Programming and Scripting

Read from file specific place in file using inode

Hello, I am using tcsh on AIX. I would like to write a script that does the following: 1. given an inode, how do I find exactly the name of the file? I know I could do this using ls -i | grep <inode> but it returns: <inode> <filename>. I need some string manipulation or something to... (1 Reply)
Discussion started by: lastZenMaster
1 Replies

5. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: gpk_newbie
2 Replies

6. Shell Programming and Scripting

how read specific line in a file and write it in a new text file?

I have list of files in a directory 'dir'. Each file is of type HTML. I need to read each file and get the string which starts with 'http' and write them in a new text file. How can i do this shell scripting? file1.html <head> <url>http://www.google.com</url> </head> file2.html <head>... (6 Replies)
Discussion started by: vel4ever
6 Replies

7. Shell Programming and Scripting

How to read particular line in file from specific column?

Hi...friends.... I want to create inventory...information for that I need to read some specific row say 2nd row from 1st 3 column and and write data with particular file used, I have some more column also but I need only 3 column data of first entry after header I attached sample file..those... (12 Replies)
Discussion started by: nex_asp
12 Replies

8. 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

9. 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

10. 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
DPKG::Log::Analyse(3pm) 				User Contributed Perl Documentation				   DPKG::Log::Analyse(3pm)

NAME
DPKG::Log::Analyse - Analyse a dpkg log VERSION
version 1.20 SYNOPSIS
use DPKG::Log; my $analyser = DPKG::Log::Analyse->new('filename' => 'dpkg.log'); $analyser->analyse; DESCRIPTION
This module is used to analyse a dpkg log. METHODS
$analser = DPKG::Log::Analyse->new('filename' => 'dpkg.log') $analyser = DPKG::Log::Analyse->new('log_handle' => $dpkg_log) Returns a new DPKG::Log::Analyse object. Filename parameter can be omitted, it defaults to /var/log/dpkg.log. Its possible to specify an existing DPKG::Log object instead of a filename. This will be used and overrides any filename setting. $analyser->analyse; Analyse the debian package log. $analyser->newly_installed_packages Return all packages which were newly installed in the dpkg.log. $analyser->upgraded_packages Return all packages which were upgraded in the dpkg.log. $analyser->removed_packages Return all packages which were removed in the dpkg.log. $analyser->unpacked_packages Return all packages which are left in state 'unpacked'. $analyser->halfinstalled_packages Return all packages which are left in state 'half-installed'. $analyser->halfconfigured_packages Return all packages which are left in state 'half-configured'. $analyser->installed_and_removed_packages Return all packages which got installed and removed. SEE ALSO
DPKG::Log, DPKG::Log::Analyse::Package AUTHOR
Patrick Schoenfeld <schoenfeld@debian.org>. COPYRIGHT AND LICENSE
Copyright (C) 2011 Patrick Schoenfeld <schoenfeld@debian.org> This library is free software. You can redistribute it and/or modify it under the same terms as perl itself. perl v5.10.1 2011-02-26 DPKG::Log::Analyse(3pm)
All times are GMT -4. The time now is 12:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy