The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
copy lines from opne file to another HIMANI UNIX for Dummies Questions & Answers 2 03-15-2008 02:57 AM
Purge files based on timestamp avl in file name sureshg_sampat Shell Programming and Scripting 3 02-29-2008 08:28 AM
Copy only the initial 10 lines from a file to another jockey007 Shell Programming and Scripting 5 11-02-2007 11:05 AM
Retaining timestamp on copy of a file param_it UNIX for Advanced & Expert Users 1 09-10-2007 01:55 AM
Grabbing lines out of a file based on a date bsp18974 Shell Programming and Scripting 2 07-17-2006 05:58 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 05-21-2008
Registered User
 

Join Date: May 2008
Posts: 1
Question Copy lines from a log file based on timestamp

how to copy lines from a log file based on timestamp.

INFO [11:08:00] (RbrProcessFlifoEventSessionEJB.javarocessFlight:274) - E_20080521_110754_967: rbrAciInfoObjects listing complete!
INFO [11:08:00] (RbrPnrProcessEventSessionEJB.javarocessFlight:197) - Event Seq: 1647575217; Carrier: UA; Flt#: 0106; Origin: LAX; Dest: O
RD; SchedDepDate: 2008-05-21; Psgr Boarded: true; Pnr Loc Value: ZSQJ3I
INFO [11:08:01] (RbrPnrProcessEventSessionEJB.javarocessFlight:197) - Event Seq: 1647575217; Carrier: UA; Flt#: 0106; Origin: LAX; Dest: O
RD; SchedDepDate: 2008-05-21; Psgr Boarded: true; Pnr Loc Value: RXK8XI
INFO [11:08:01] (RbrPnrProcessEventSessionEJB.javarocessFlight:197) - Event Seq: 1647575217; Carrier: UA; Flt#: 0106; Origin: LAX; Dest: O
RD; SchedDepDate: 2008-05-21; Psgr Boarded: true; Pnr Loc Value: QGPJBI


Like this i have soo much of data. i need to grep some part of lines based on timestamp [11:08:00 to 12:20:55]

pls help me out..
Reply With Quote
Forum Sponsor
  #2  
Old 05-22-2008
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,197
OK, do a 'grep "time stamp here" file-name > filteredLogs.tmp; cp filteredLogs.tmp whateverNameYouLike.log and voila
The grep for particular pattern will output the lines matching the criteria, and then you redirect the result to a temp file, then you copy this file with a preferred name, HTH.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:11 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0