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)
======
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)
======