Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script to exploit log

Status
Not open for further replies.

djessi

IS-IT--Management
Dec 29, 2006
93
CM
Hi all,
I have a file with patterns like the one hereafter, patterns begin and end with ======, there are many lines inside a pattern. It's a log and what I want to do is to check every pattern to look if the string ERROR exists and if so print that string and the date, hour and Reference contained in the pattern.
I need help to write the script shell.
Thanks in advance
Djessi

======
05/02/2007 04:51:02 [8714]: abdndala.c01.07: SAMS can not be sent, TYPE=DOUBE, STATE: 342184546 (slipt 6,Entity:ANY).
ERROR: 4685 Reference :=172910706273
absolute MM :=)(A1225:clAd=0000)(29746:messi :=624020100762629)(2747:hel_lang=3)(K2749:
sams_id=398)
======
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top