Hi
Please find the exact logs below
logs:
29-Jul-2011 08:48:22,653 GMT Static data requires update
serverID=fxValue,CancelTimestamp=0,createdTimestamp=1311925697809,lastUpdatedBy=null,revision=0]
Location=London,Name=IBM London Operation Vincenzo Maini,cancelReason=null,ndf=false,
29-Jul-2011 08:48:23,653 GMT Static data requires update
serverID=fxValue,CancelTimestamp=0,createdTimestamp=6311925697809,lastUpdatedBy=null,revision=0]
Location=London,Name=IBM London Operation Vincenzo Maini,cancelReason=null,ndf=false,
createdByUserId=sam@gmail.com
------------------------
-------------------------
-------------------------
-------------------------
29-Jul-2011 08:48:24,653 serverID=fxValue,CancelTimestamp=0,createdTimestamp=8311925697809, lastUpdatedBy=null,revision=0] Location=London,Name=IBM London Operation Vincenzo Ludovico Maini,cancelReason=null,ndf=false,book=LEMFXAUT, createdByUserId=sam@gmail.com
In the above logs my search pattern will be 08:48:22 and UserId=sam@gmail.com
---------- Post updated 08-17-11 at 03:05 PM ---------- Previous update was 08-16-11 at 04:38 PM ----------
Hi All,
I finally got the logic by reading few older posts in this site
really this site is very helpful for the beginners like me
Here is working logic
awk '
BEGIN { start=0; skip=0; }
{
if(index($0, "08:48:22")> 0)
{start=1; print $0}
else
if(index($0, "sam@gmail.com")> 0) { if(skip==0) skip=1; else {skip=0; start=0; print$0 }}
else
if(start==1)
{
print $0
}
} ' log
Thanks