Sponsored Content
Top Forums Shell Programming and Scripting Getting info from a huge log file Post 302554139 by cwiggler on Saturday 10th of September 2011 08:10:03 AM
Old 09-10-2011
Hi Ahamed and Yazu.

Thank you for the reply and solution. Actually I haven't tried it yet but who do I add the add the grep of the log file first then get the details?

The log file contains of data with the same info but what I need to get is from the specific timestamp.

Thanks


Quote:
Originally Posted by ahamed101
Code:
awk -F: '/BIOS Name:|BIOS Date:|BIOS QUALITY:/ {x=x$(NF-1)":"$(NF)"\n";} /BIOS INFO:/{print x}' logfile

Something like this?

--ahamed
Quote:
Originally Posted by yazu
Or like this:
Code:
awk -F': ' '
$2 == "BIOS Name" {
  name = $0; getline; date = $0; getline; quality = $0;
}
$3 == "BIOS INFO" {
  printf "%s\n%s\n%s\n", name, date, quality
  exit
}          
' INPUTFILE

 

10 More Discussions You Might Find Interesting

1. Linux

Searching for gaps in huge (2.2G) log file?

I've got a 2.2 Gig syslog file from our Cisco firewall appliance. The problem is that we've been seeing gaps in the syslog for anywhere from 10 minutes to 2 hours. Currently I've just been using 'less' and paging through the file to see if I can find any noticeable gaps. Obviously this isn't the... (3 Replies)
Discussion started by: deckard
3 Replies

2. Shell Programming and Scripting

insert a header in a huge data file without using an intermediate file

I have a file with data extracted, and need to insert a header with a constant string, say: H|PayerDataExtract if i use sed, i have to redirect the output to a seperate file like sed ' sed commands' ExtractDataFile.dat > ExtractDataFileWithHeader.dat the same is true for awk and... (10 Replies)
Discussion started by: deepaktanna
10 Replies

3. Shell Programming and Scripting

Extract info from log file and compute using time date stamp

Looking for a shell script or a simple perl script . I am new to scripting and not very good at it . I have 2 directories . One of them holds a text file with list of files in it and the second one is a daily log which shows the file completion time. I need to co-relate both and make a report. ... (0 Replies)
Discussion started by: breez_drew
0 Replies

4. Shell Programming and Scripting

Log File - Getting Info about preceding Date of Pattern Found

Ok Suppose I have a log file like the below: 2010-07-15 00:00:01,410 DEBUG 2010-07-15 00:01:01,410 DEBUG 2010-07-15 00:01:02,410 DEBUG com.af ajfajfaf affafadfadfd dfa fdfadfdfadfadf fafafdfadfdafadfdaffdaffadf afdfdafdfdafafd error error failure afdfadfdfdfdf EBUDGG eafaferror failure... (6 Replies)
Discussion started by: SkySmart
6 Replies

5. Shell Programming and Scripting

Help finding info from log file

Hi, I have a log file that contains information such as this: date id number command1 command2 command3 command4 data data data date id number command1 command2 command3 command4 (4 Replies)
Discussion started by: bbbngowc
4 Replies

6. Shell Programming and Scripting

Optimised way for search & replace a value on one line in a very huge file (File Size is 24 GB).

Hi Experts, I had to edit (a particular value) in header line of a very huge file so for that i wanted to search & replace a particular value on a file which was of 24 GB in Size. I managed to do it but it took long time to complete. Can anyone please tell me how can we do it in a optimised... (7 Replies)
Discussion started by: manishkomar007
7 Replies

7. Shell Programming and Scripting

Event logging to file and display to console | tee command is not able to log all info.

My intention is to log the output to a file as well as it should be displayed on the console > I have used tee ( tee -a ${filename} ) command for this purpose. This is working as expected for first few outputs, after some event loggin nothing is gettting logged in to the file but It is displaying... (3 Replies)
Discussion started by: sanoop
3 Replies

8. Shell Programming and Scripting

HELP: Shell Script to read a Log file line by line and extract Info based on KEYWORDS matching

I have a LOG file which looks like this Import started at: Mon Jul 23 02:13:01 EDT 2012 Initialization completed in 2.146 seconds. -------------------------------------------------------------------------------- -- Import summary for Import item: PolicyInformation... (8 Replies)
Discussion started by: biztank
8 Replies

9. Shell Programming and Scripting

How to select bulk of info from log file?

unix : sun shell : bash i need to select multiple rows with this format : <special format> 10 lines /<special format> from log file that have lots of info i thought of getting the number of the first line using grep -n "special format" file | cut -d: -f1 then pass it to shell... (2 Replies)
Discussion started by: scorpioneer
2 Replies

10. Shell Programming and Scripting

Help on script to capture info on log file for a particular time frame

Hi I have a system running uname -a Linux cmovel-db01 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux I would like to capture the contents of /var/log/syslog from 11:00AM to 11:30AM and sent to this info via email. I was thinking in set a cron entry at that... (2 Replies)
Discussion started by: fretagi
2 Replies
TRM(4)							   BSD Kernel Interfaces Manual 						    TRM(4)

NAME
trm -- Tekram TRM-S1040 ASIC based PCI SCSI host adapter driver SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device scbus device trm Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): trm_load="YES" DESCRIPTION
The trm driver supports PCI SCSI host adapters based on the Tekram TRM-S1040 SCSI ASIC. HARDWARE
SCSI controllers supported by the trm driver include: o Tekram DC-315 PCI Ultra SCSI adapter without BIOS and internal SCSI connector o Tekram DC-315U PCI Ultra SCSI adapter without BIOS o Tekram DC-395F PCI Ultra-Wide SCSI adapter with flash BIOS and 68-pin external SCSI connector o Tekram DC-395U PCI Ultra SCSI adapter with flash BIOS o Tekram DC-395UW PCI Ultra-Wide SCSI adapter with flash BIOS o Tekram DC-395U2W PCI Ultra2-Wide SCSI adapter with flash BIOS For the Tekram DC-310/U and DC-390F/U/UW/U2B/U2W/U3W PCI SCSI host adapters, use the sym(4) driver. SEE ALSO
cd(4), ch(4), da(4), intro(4), sa(4), scsi(4), sym(4) http://www.tekram.com/ AUTHORS
The trm driver was originally written for FreeBSD 3.0/i386 by Erich Chen of Tekram Technology, and ported to FreeBSD 5.0 by Olivier Houchard <cognet@FreeBSD.org>. BSD
December 8, 2002 BSD
All times are GMT -4. The time now is 08:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy