In below test.log
file I want to search only today's date with Message "Upload_Msg_testListeningFn"; if both the conditions match then redirect the output.
cat /tmp/test.log
===========================================================================
system Version [45.2.18] (FATAL ERROR INFORMATION)
File: [test003.cxx]
Line: [240]
Date: [19-01-2018 21:09:40]
User ID: [SYSTEM]
Message : [batman error: Upload_Msg_testListeningFn]
Error Code : [TEST0000057]
Outside FGH
Session Id: 6768678898:00:F
=======================================
Output should be:
Date: [19-01-2018 21:09:40]
Message : [batman error: Upload_Msg_testListeningFn]
I used awk but somewhere I am missing something
i used the below command for finding lines after particular date.
awk '/^Date/{c=3} c&&c--' /tmp/test.log